package androidx.recyclerview.widget;

import android.annotation.SuppressLint;
import android.content.Context;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.database.Observable;
import android.graphics.Canvas;
import android.graphics.Matrix;
import android.graphics.PointF;
import android.graphics.Rect;
import android.graphics.RectF;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.StateListDrawable;
import android.os.Build.VERSION;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.SystemClock;
import android.util.AttributeSet;
import android.util.Log;
import android.util.SparseArray;
import android.view.FocusFinder;
import android.view.MotionEvent;
import android.view.VelocityTracker;
import android.view.View;
import android.view.ViewConfiguration;
import android.view.ViewGroup;
import android.view.ViewParent;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityManager;
import android.view.animation.Interpolator;
import android.widget.EdgeEffect;
import android.widget.OverScroller;
import androidx.annotation.CallSuper;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.Px;
import androidx.annotation.RestrictTo;
import androidx.annotation.VisibleForTesting;
import androidx.appcompat.widget.ActivityChooserView.ActivityChooserViewAdapter;
import androidx.core.view.ViewCompat;
import androidx.customview.view.AbsSavedState;
import com.huawei.hms.framework.network.restclient.hwhttp.dns.DnsConfig;
import com.huawei.hwid.core.constants.HwAccountConstants;
import com.tencent.mm.opensdk.modelmsg.WXMediaMessage;
import java.lang.ref.WeakReference;
import java.lang.reflect.Constructor;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import o.gp;
import o.hf;
import o.ho;
import o.hp;
import o.hr;
import o.ia;
import o.ii;
import o.in;
import o.it;
import o.mc;
import o.md;
import o.me;
import o.mf;
import o.mg;
import o.mp;
import o.ms;
import o.ms.d;

public class RecyclerView extends ViewGroup implements ho {
    static final boolean ˊ;
    static final boolean ˎ;
    static final boolean ˏ;
    static final Interpolator ˏˎ = new Interpolator() {
        public float getInterpolation(float f) {
            float f2 = f - 1.0f;
            return (f2 * (((f2 * f2) * f2) * f2)) + 1.0f;
        }
    };
    private static final int[] ˏˏ = new int[]{16842987};
    private static final int[] ͺॱ = new int[]{16843830};
    private static final boolean ـ;
    static final boolean ॱ;
    private static final Class<?>[] ॱʻ = new Class[]{Context.class, AttributeSet.class, Integer.TYPE, Integer.TYPE};
    private static final boolean ॱͺ;
    private EdgeEffect ʹ;
    boolean ʻ;
    private VelocityTracker ʻˊ;
    private int ʻˋ;
    @VisibleForTesting
    boolean ʻॱ;
    private int ʻᐝ;
    public mg ʼ;
    private int ʼˊ;
    private int ʼˋ;
    public boolean ʼॱ;
    private int ʼᐝ;
    final Runnable ʽ;
    private i ʽˊ;
    private final int ʽˋ;
    boolean ʽॱ;
    private int ʽᐝ;
    boolean ʾ;
    private int ʾॱ;
    boolean ʿ;
    private float ʿॱ;
    boolean ˈ;
    private final int ˈॱ;
    public o.md.b ˉ;
    private float ˉॱ;
    private n ˊʻ;
    private boolean ˊʼ;
    private e ˊʽ;
    md ˊˊ;
    ItemAnimator ˊˋ;
    public a ˊॱ;
    final p ˊᐝ;
    public final o ˋ;
    private d ˋʻ;
    private final int[] ˋʼ;
    private List<n> ˋʽ;
    public final t ˋˊ;
    boolean ˋˋ;
    @VisibleForTesting
    public j ˋॱ;
    boolean ˋᐝ;
    boolean ˌ;
    private hr ˌॱ;
    final int[] ˍ;
    mp ˎˎ;
    final int[] ˎˏ;
    private Runnable ˎͺ;
    private final int[] ˏͺ;
    final Rect ˏॱ;
    @VisibleForTesting
    final List<s> ˑ;
    private final d ˑॱ;
    l ͺ;
    private final int[] ͺˏ;
    private final k ॱʼ;
    private SavedState ॱʽ;
    final RectF ॱˊ;
    boolean ॱˋ;
    final ArrayList<f> ॱˎ;
    public mc ॱॱ;
    boolean ॱᐝ;
    final ms ᐝ;
    private final Rect ᐝˊ;
    private final ArrayList<g> ᐝˋ;
    boolean ᐝॱ;
    private boolean ᐝᐝ;
    private int ᐧ;
    private g ᐨ;
    private int ᶥ;
    private int ㆍ;
    private final AccessibilityManager ꓸ;
    private int ꜞ;
    private List<h> ꜟ;
    private EdgeEffect ꞌ;
    private EdgeEffect ﹳ;
    @NonNull
    private EdgeEffectFactory ﾞ;
    private EdgeEffect ﾟ;

    public static abstract class j {
        @Nullable
        q ʻॱ;
        private int ʼ;
        boolean ʼॱ = false;
        private int ʽ;
        public boolean ʽॱ;
        public int ʾ;
        boolean ʿ = false;
        boolean ˈ = false;
        private int ˊ;
        private boolean ˋ = true;
        private final e ˎ = new e(this) {
            final /* synthetic */ j ˊ;

            {
                this.ˊ = r1;
            }

            public View ˎ(int i) {
                return this.ˊ.ᐝ(i);
            }

            public int ˊ() {
                return this.ˊ.ˋˋ();
            }

            public int ˏ() {
                return this.ˊ.ˉ() - this.ˊ.ˍ();
            }

            public int ॱ(View view) {
                return this.ˊ.ʼ(view) - ((LayoutParams) view.getLayoutParams()).topMargin;
            }

            public int ˊ(View view) {
                LayoutParams layoutParams = (LayoutParams) view.getLayoutParams();
                return layoutParams.bottomMargin + this.ˊ.ˊॱ(view);
            }
        };
        private boolean ˏ = true;
        private final e ॱ = new e(this) {
            final /* synthetic */ j ˋ;

            {
                this.ˋ = r1;
            }

            public View ˎ(int i) {
                return this.ˋ.ᐝ(i);
            }

            public int ˊ() {
                return this.ˋ.ˊˊ();
            }

            public int ˏ() {
                return this.ˋ.ˋˊ() - this.ˋ.ˋᐝ();
            }

            public int ॱ(View view) {
                return this.ˋ.ʻ(view) - ((LayoutParams) view.getLayoutParams()).leftMargin;
            }

            public int ˊ(View view) {
                LayoutParams layoutParams = (LayoutParams) view.getLayoutParams();
                return layoutParams.rightMargin + this.ˋ.ʽ(view);
            }
        };
        ViewBoundsCheck ॱˋ = new ViewBoundsCheck(this.ˎ);
        RecyclerView ॱˎ;
        private int ॱॱ;
        ViewBoundsCheck ॱᐝ = new ViewBoundsCheck(this.ॱ);
        mg ᐝॱ;

        public interface b {
            void ˎ(int i, int i2);
        }

        public abstract LayoutParams ॱ();

        void ॱ(RecyclerView recyclerView) {
            if (recyclerView == null) {
                this.ॱˎ = null;
                this.ᐝॱ = null;
                this.ॱॱ = 0;
                this.ʽ = 0;
            } else {
                this.ॱˎ = recyclerView;
                this.ᐝॱ = recyclerView.ʼ;
                this.ॱॱ = recyclerView.getWidth();
                this.ʽ = recyclerView.getHeight();
            }
            this.ˊ = 1073741824;
            this.ʼ = 1073741824;
        }

        void ˋ(int i, int i2) {
            this.ॱॱ = MeasureSpec.getSize(i);
            this.ˊ = MeasureSpec.getMode(i);
            if (this.ˊ == 0 && !RecyclerView.ˊ) {
                this.ॱॱ = 0;
            }
            this.ʽ = MeasureSpec.getSize(i2);
            this.ʼ = MeasureSpec.getMode(i2);
            if (this.ʼ == 0 && !RecyclerView.ˊ) {
                this.ʽ = 0;
            }
        }

        void ˏ(int i, int i2) {
            int i3 = ActivityChooserViewAdapter.MAX_ACTIVITY_COUNT_UNLIMITED;
            int i4 = Integer.MIN_VALUE;
            int ˈ = ˈ();
            if (ˈ == 0) {
                this.ॱˎ.ˏ(i, i2);
                return;
            }
            int i5 = Integer.MIN_VALUE;
            int i6 = ActivityChooserViewAdapter.MAX_ACTIVITY_COUNT_UNLIMITED;
            for (int i7 = 0; i7 < ˈ; i7++) {
                View ᐝ = ᐝ(i7);
                Rect rect = this.ॱˎ.ˏॱ;
                ॱ(ᐝ, rect);
                if (rect.left < i6) {
                    i6 = rect.left;
                }
                if (rect.right > i5) {
                    i5 = rect.right;
                }
                if (rect.top < i3) {
                    i3 = rect.top;
                }
                if (rect.bottom > i4) {
                    i4 = rect.bottom;
                }
            }
            this.ॱˎ.ˏॱ.set(i6, i3, i5, i4);
            ॱ(this.ॱˎ.ˏॱ, i, i2);
        }

        public void ॱ(Rect rect, int i, int i2) {
            ʻ(ˎ(i, (rect.width() + ˊˊ()) + ˋᐝ(), ͺॱ()), ˎ(i2, (rect.height() + ˋˋ()) + ˍ(), ˏˎ()));
        }

        public void ॱˋ() {
            if (this.ॱˎ != null) {
                this.ॱˎ.requestLayout();
            }
        }

        public static int ˎ(int i, int i2, int i3) {
            int mode = MeasureSpec.getMode(i);
            int size = MeasureSpec.getSize(i);
            switch (mode) {
                case Integer.MIN_VALUE:
                    return Math.min(size, Math.max(i2, i3));
                case 1073741824:
                    return size;
                default:
                    return Math.max(i2, i3);
            }
        }

        public void ˎ(String str) {
            if (this.ॱˎ != null) {
                this.ॱˎ.ˊ(str);
            }
        }

        public boolean ˋ() {
            return this.ʿ;
        }

        public boolean ˏ() {
            return false;
        }

        public final boolean ॱᐝ() {
            return this.ˋ;
        }

        public void ˊ(int i, int i2, t tVar, b bVar) {
        }

        public void ˋ(int i, b bVar) {
        }

        void ˊ(RecyclerView recyclerView) {
            this.ˈ = true;
            ˋ(recyclerView);
        }

        void ॱ(RecyclerView recyclerView, o oVar) {
            this.ˈ = false;
            ˊ(recyclerView, oVar);
        }

        public boolean ᐝॱ() {
            return this.ˈ;
        }

        public boolean ˎ(Runnable runnable) {
            if (this.ॱˎ != null) {
                return this.ॱˎ.removeCallbacks(runnable);
            }
            return false;
        }

        @CallSuper
        public void ˋ(RecyclerView recyclerView) {
        }

        @Deprecated
        public void ˏ(RecyclerView recyclerView) {
        }

        @CallSuper
        public void ˊ(RecyclerView recyclerView, o oVar) {
            ˏ(recyclerView);
        }

        public boolean ʿ() {
            return this.ॱˎ != null && this.ॱˎ.ʻ;
        }

        public void ˋ(o oVar, t tVar) {
            Log.e("RecyclerView", "You must override onLayoutChildren(Recycler recycler, State state) ");
        }

        public void ˋ(t tVar) {
        }

        public boolean ˏ(LayoutParams layoutParams) {
            return layoutParams != null;
        }

        public LayoutParams ˏ(android.view.ViewGroup.LayoutParams layoutParams) {
            if (layoutParams instanceof LayoutParams) {
                return new LayoutParams((LayoutParams) layoutParams);
            }
            if (layoutParams instanceof MarginLayoutParams) {
                return new LayoutParams((MarginLayoutParams) layoutParams);
            }
            return new LayoutParams(layoutParams);
        }

        public LayoutParams ˏ(Context context, AttributeSet attributeSet) {
            return new LayoutParams(context, attributeSet);
        }

        public int ˊ(int i, o oVar, t tVar) {
            return 0;
        }

        public int ˎ(int i, o oVar, t tVar) {
            return 0;
        }

        public boolean ʻ() {
            return false;
        }

        public boolean ʼ() {
            return false;
        }

        public void ˏ(int i) {
        }

        public void ॱ(q qVar) {
            if (!(this.ʻॱ == null || qVar == this.ʻॱ || !this.ʻॱ.ʽ())) {
                this.ʻॱ.ᐝ();
            }
            this.ʻॱ = qVar;
            this.ʻॱ.ˎ(this.ॱˎ, this);
        }

        public boolean ʾ() {
            return this.ʻॱ != null && this.ʻॱ.ʽ();
        }

        public int ʽॱ() {
            return ViewCompat.ʼ(this.ॱˎ);
        }

        public void ॱ(View view) {
            ˏ(view, -1);
        }

        public void ˏ(View view, int i) {
            ˊ(view, i, true);
        }

        public void ˊ(View view) {
            ˊ(view, -1);
        }

        public void ˊ(View view, int i) {
            ˊ(view, i, false);
        }

        private void ˊ(View view, int i, boolean z) {
            s ˏ = RecyclerView.ˏ(view);
            if (z || ˏ.ʻॱ()) {
                this.ॱˎ.ᐝ.ˏ(ˏ);
            } else {
                this.ॱˎ.ᐝ.ᐝ(ˏ);
            }
            LayoutParams layoutParams = (LayoutParams) view.getLayoutParams();
            if (ˏ.ˋॱ() || ˏ.ʼ()) {
                if (ˏ.ʼ()) {
                    ˏ.ʻ();
                } else {
                    ˏ.ˏॱ();
                }
                this.ᐝॱ.ॱ(view, i, view.getLayoutParams(), false);
            } else if (view.getParent() == this.ॱˎ) {
                int ॱ = this.ᐝॱ.ॱ(view);
                if (i == -1) {
                    i = this.ᐝॱ.ˊ();
                }
                if (ॱ == -1) {
                    throw new IllegalStateException("Added View has RecyclerView as parent but view is not a real child. Unfiltered index:" + this.ॱˎ.indexOfChild(view) + this.ॱˎ.ˎ());
                } else if (ॱ != i) {
                    this.ॱˎ.ˋॱ.ॱॱ(ॱ, i);
                }
            } else {
                this.ᐝॱ.ˎ(view, i, false);
                layoutParams.ˋ = true;
                if (this.ʻॱ != null && this.ʻॱ.ʽ()) {
                    this.ʻॱ.ॱ(view);
                }
            }
            if (layoutParams.ʻ) {
                ˏ.ˊ.invalidate();
                layoutParams.ʻ = false;
            }
        }

        public void ˋ(View view) {
            this.ᐝॱ.ˏ(view);
        }

        public void ʼ(int i) {
            if (ᐝ(i) != null) {
                this.ᐝॱ.ॱ(i);
            }
        }

        public int ʼॱ() {
            return -1;
        }

        public int ˎ(@NonNull View view) {
            return ((LayoutParams) view.getLayoutParams()).ʻ();
        }

        @Nullable
        public View ˏ(@NonNull View view) {
            if (this.ॱˎ == null) {
                return null;
            }
            View ˊ = this.ॱˎ.ˊ(view);
            if (ˊ == null || this.ᐝॱ.ˋ(ˊ)) {
                return null;
            }
            return ˊ;
        }

        @Nullable
        public View ˋ(int i) {
            int ˈ = ˈ();
            for (int i2 = 0; i2 < ˈ; i2++) {
                View ᐝ = ᐝ(i2);
                s ˏ = RecyclerView.ˏ(ᐝ);
                if (ˏ != null && ˏ.ˏ() == i && !ˏ.G_() && (this.ॱˎ.ˋˊ.ˋ() || !ˏ.ʻॱ())) {
                    return ᐝ;
                }
            }
            return null;
        }

        public void ॱॱ(int i) {
            ॱ(i, ᐝ(i));
        }

        private void ॱ(int i, @NonNull View view) {
            this.ᐝॱ.ˊ(i);
        }

        public void ˊ(@NonNull View view, int i, LayoutParams layoutParams) {
            s ˏ = RecyclerView.ˏ(view);
            if (ˏ.ʻॱ()) {
                this.ॱˎ.ᐝ.ˏ(ˏ);
            } else {
                this.ॱˎ.ᐝ.ᐝ(ˏ);
            }
            this.ᐝॱ.ॱ(view, i, layoutParams, ˏ.ʻॱ());
        }

        public void ˎ(@NonNull View view, int i) {
            ˊ(view, i, (LayoutParams) view.getLayoutParams());
        }

        public void ॱॱ(int i, int i2) {
            View ᐝ = ᐝ(i);
            if (ᐝ == null) {
                throw new IllegalArgumentException("Cannot move a child from non-existing index:" + i + this.ॱˎ.toString());
            }
            ॱॱ(i);
            ˎ(ᐝ, i2);
        }

        public void ˏ(@NonNull View view, @NonNull o oVar) {
            ˋ(view);
            oVar.ˊ(view);
        }

        public void ˊ(int i, @NonNull o oVar) {
            View ᐝ = ᐝ(i);
            ʼ(i);
            oVar.ˊ(ᐝ);
        }

        public int ˈ() {
            return this.ᐝॱ != null ? this.ᐝॱ.ˊ() : 0;
        }

        @Nullable
        public View ᐝ(int i) {
            return this.ᐝॱ != null ? this.ᐝॱ.ˎ(i) : null;
        }

        public int ˊˋ() {
            return this.ˊ;
        }

        public int ˊᐝ() {
            return this.ʼ;
        }

        @Px
        public int ˋˊ() {
            return this.ॱॱ;
        }

        @Px
        public int ˉ() {
            return this.ʽ;
        }

        @Px
        public int ˊˊ() {
            return this.ॱˎ != null ? this.ॱˎ.getPaddingLeft() : 0;
        }

        @Px
        public int ˋˋ() {
            return this.ॱˎ != null ? this.ॱˎ.getPaddingTop() : 0;
        }

        @Px
        public int ˋᐝ() {
            return this.ॱˎ != null ? this.ॱˎ.getPaddingRight() : 0;
        }

        @Px
        public int ˍ() {
            return this.ॱˎ != null ? this.ॱˎ.getPaddingBottom() : 0;
        }

        @Nullable
        public View ˎˎ() {
            if (this.ॱˎ == null) {
                return null;
            }
            View focusedChild = this.ॱˎ.getFocusedChild();
            if (focusedChild == null || this.ᐝॱ.ˋ(focusedChild)) {
                return null;
            }
            return focusedChild;
        }

        public int ˌ() {
            a ˋ = this.ॱˎ != null ? this.ॱˎ.ˋ() : null;
            return ˋ != null ? ˋ.ˏ() : 0;
        }

        public void ʻ(@Px int i) {
            if (this.ॱˎ != null) {
                this.ॱˎ.ॱॱ(i);
            }
        }

        public void ͺ(@Px int i) {
            if (this.ॱˎ != null) {
                this.ॱˎ.ʽ(i);
            }
        }

        public void ˎ(@NonNull o oVar) {
            for (int ˈ = ˈ() - 1; ˈ >= 0; ˈ--) {
                ˊ(oVar, ˈ, ᐝ(ˈ));
            }
        }

        private void ˊ(o oVar, int i, View view) {
            s ˏ = RecyclerView.ˏ(view);
            if (!ˏ.G_()) {
                if (!ˏ.ॱˊ() || ˏ.ʻॱ() || this.ॱˎ.ˊॱ.ˋ()) {
                    ॱॱ(i);
                    oVar.ˋ(view);
                    this.ॱˎ.ᐝ.ʻ(ˏ);
                    return;
                }
                ʼ(i);
                oVar.ˊ(ˏ);
            }
        }

        void ˋ(o oVar) {
            int ˏ = oVar.ˏ();
            for (int i = ˏ - 1; i >= 0; i--) {
                View ˎ = oVar.ˎ(i);
                s ˏ2 = RecyclerView.ˏ(ˎ);
                if (!ˏ2.G_()) {
                    ˏ2.ॱ(false);
                    if (ˏ2.ॱˋ()) {
                        this.ॱˎ.removeDetachedView(ˎ, false);
                    }
                    if (this.ॱˎ.ˊˋ != null) {
                        this.ॱˎ.ˊˋ.ˊ(ˏ2);
                    }
                    ˏ2.ॱ(true);
                    oVar.ˎ(ˎ);
                }
            }
            oVar.ᐝ();
            if (ˏ > 0) {
                this.ॱˎ.invalidate();
            }
        }

        boolean ˎ(View view, int i, int i2, LayoutParams layoutParams) {
            return (this.ˏ && ˊ(view.getMeasuredWidth(), i, layoutParams.width) && ˊ(view.getMeasuredHeight(), i2, layoutParams.height)) ? false : true;
        }

        boolean ॱ(View view, int i, int i2, LayoutParams layoutParams) {
            return (!view.isLayoutRequested() && this.ˏ && ˊ(view.getWidth(), i, layoutParams.width) && ˊ(view.getHeight(), i2, layoutParams.height)) ? false : true;
        }

        private static boolean ˊ(int i, int i2, int i3) {
            int mode = MeasureSpec.getMode(i2);
            int size = MeasureSpec.getSize(i2);
            if (i3 > 0 && i != i3) {
                return false;
            }
            switch (mode) {
                case Integer.MIN_VALUE:
                    if (size < i) {
                        return false;
                    }
                    return true;
                case 0:
                    return true;
                case 1073741824:
                    if (size != i) {
                        return false;
                    }
                    return true;
                default:
                    return false;
            }
        }

        public void ˊ(@NonNull View view, int i, int i2) {
            LayoutParams layoutParams = (LayoutParams) view.getLayoutParams();
            Rect ʻ = this.ॱˎ.ʻ(view);
            int i3 = (ʻ.left + ʻ.right) + i;
            int i4 = (ʻ.bottom + ʻ.top) + i2;
            i3 = ˋ(ˋˊ(), ˊˋ(), i3 + (((ˊˊ() + ˋᐝ()) + layoutParams.leftMargin) + layoutParams.rightMargin), layoutParams.width, ʻ());
            i4 = ˋ(ˉ(), ˊᐝ(), i4 + (((ˋˋ() + ˍ()) + layoutParams.topMargin) + layoutParams.bottomMargin), layoutParams.height, ʼ());
            if (ॱ(view, i3, i4, layoutParams)) {
                view.measure(i3, i4);
            }
        }

        public static int ˋ(int i, int i2, int i3, int i4, boolean z) {
            int i5 = 0;
            int max = Math.max(0, i - i3);
            if (z) {
                if (i4 >= 0) {
                    i5 = 1073741824;
                    max = i4;
                } else if (i4 == -1) {
                    switch (i2) {
                        case Integer.MIN_VALUE:
                        case 1073741824:
                            i5 = max;
                            break;
                        case 0:
                            i2 = 0;
                            break;
                        default:
                            i2 = 0;
                            break;
                    }
                    max = i5;
                    i5 = i2;
                } else {
                    if (i4 == -2) {
                        max = 0;
                    }
                    max = 0;
                }
            } else if (i4 >= 0) {
                i5 = 1073741824;
                max = i4;
            } else if (i4 == -1) {
                i5 = i2;
            } else {
                if (i4 == -2) {
                    if (i2 == Integer.MIN_VALUE || i2 == 1073741824) {
                        i5 = Integer.MIN_VALUE;
                    }
                }
                max = 0;
            }
            return MeasureSpec.makeMeasureSpec(max, i5);
        }

        public int ॱॱ(@NonNull View view) {
            Rect rect = ((LayoutParams) view.getLayoutParams()).ˏ;
            return rect.right + (view.getMeasuredWidth() + rect.left);
        }

        public int ᐝ(@NonNull View view) {
            Rect rect = ((LayoutParams) view.getLayoutParams()).ˏ;
            return rect.bottom + (view.getMeasuredHeight() + rect.top);
        }

        public void ˋ(@NonNull View view, int i, int i2, int i3, int i4) {
            LayoutParams layoutParams = (LayoutParams) view.getLayoutParams();
            Rect rect = layoutParams.ˏ;
            view.layout((rect.left + i) + layoutParams.leftMargin, (rect.top + i2) + layoutParams.topMargin, (i3 - rect.right) - layoutParams.rightMargin, (i4 - rect.bottom) - layoutParams.bottomMargin);
        }

        public void ॱ(@NonNull View view, boolean z, @NonNull Rect rect) {
            if (z) {
                Rect rect2 = ((LayoutParams) view.getLayoutParams()).ˏ;
                rect.set(-rect2.left, -rect2.top, view.getWidth() + rect2.right, rect2.bottom + view.getHeight());
            } else {
                rect.set(0, 0, view.getWidth(), view.getHeight());
            }
            if (this.ॱˎ != null) {
                Matrix matrix = view.getMatrix();
                if (!(matrix == null || matrix.isIdentity())) {
                    RectF rectF = this.ॱˎ.ॱˊ;
                    rectF.set(rect);
                    matrix.mapRect(rectF);
                    rect.set((int) Math.floor((double) rectF.left), (int) Math.floor((double) rectF.top), (int) Math.ceil((double) rectF.right), (int) Math.ceil((double) rectF.bottom));
                }
            }
            rect.offset(view.getLeft(), view.getTop());
        }

        public void ॱ(@NonNull View view, @NonNull Rect rect) {
            RecyclerView.ˋ(view, rect);
        }

        public int ʻ(@NonNull View view) {
            return view.getLeft() - ॱˊ(view);
        }

        public int ʼ(@NonNull View view) {
            return view.getTop() - ˋॱ(view);
        }

        public int ʽ(@NonNull View view) {
            return view.getRight() + ˏॱ(view);
        }

        public int ˊॱ(@NonNull View view) {
            return view.getBottom() + ͺ(view);
        }

        public void ˊ(@NonNull View view, @NonNull Rect rect) {
            if (this.ॱˎ == null) {
                rect.set(0, 0, 0, 0);
            } else {
                rect.set(this.ॱˎ.ʻ(view));
            }
        }

        public int ˋॱ(@NonNull View view) {
            return ((LayoutParams) view.getLayoutParams()).ˏ.top;
        }

        public int ͺ(@NonNull View view) {
            return ((LayoutParams) view.getLayoutParams()).ˏ.bottom;
        }

        public int ॱˊ(@NonNull View view) {
            return ((LayoutParams) view.getLayoutParams()).ˏ.left;
        }

        public int ˏॱ(@NonNull View view) {
            return ((LayoutParams) view.getLayoutParams()).ˏ.right;
        }

        @Nullable
        public View ˎ(@NonNull View view, int i, @NonNull o oVar, @NonNull t tVar) {
            return null;
        }

        @Nullable
        public View ॱ(@NonNull View view, int i) {
            return null;
        }

        private int[] ॱ(RecyclerView recyclerView, View view, Rect rect, boolean z) {
            int[] iArr = new int[2];
            int ˊˊ = ˊˊ();
            int ˋˋ = ˋˋ();
            int ˋˊ = ˋˊ() - ˋᐝ();
            int ˉ = ˉ() - ˍ();
            int left = (view.getLeft() + rect.left) - view.getScrollX();
            int top = (view.getTop() + rect.top) - view.getScrollY();
            int width = left + rect.width();
            int height = top + rect.height();
            int min = Math.min(0, left - ˊˊ);
            int min2 = Math.min(0, top - ˋˋ);
            int max = Math.max(0, width - ˋˊ);
            ˉ = Math.max(0, height - ˉ);
            if (ʽॱ() == 1) {
                if (max == 0) {
                    max = Math.max(min, width - ˋˊ);
                }
                min = max;
            } else {
                if (min != 0) {
                    max = min;
                } else {
                    max = Math.min(left - ˊˊ, max);
                }
                min = max;
            }
            if (min2 != 0) {
                max = min2;
            } else {
                max = Math.min(top - ˋˋ, ˉ);
            }
            iArr[0] = min;
            iArr[1] = max;
            return iArr;
        }

        public boolean ˊ(@NonNull RecyclerView recyclerView, @NonNull View view, @NonNull Rect rect, boolean z) {
            return ˋ(recyclerView, view, rect, z, false);
        }

        public boolean ˋ(@NonNull RecyclerView recyclerView, @NonNull View view, @NonNull Rect rect, boolean z, boolean z2) {
            int[] ॱ = ॱ(recyclerView, view, rect, z);
            int i = ॱ[0];
            int i2 = ॱ[1];
            if (z2 && !ˏ(recyclerView, i, i2)) {
                return false;
            }
            if (i == 0 && i2 == 0) {
                return false;
            }
            if (z) {
                recyclerView.scrollBy(i, i2);
            } else {
                recyclerView.ˊ(i, i2);
            }
            return true;
        }

        public boolean ˋ(@NonNull View view, boolean z, boolean z2) {
            boolean z3;
            if (this.ॱᐝ.ˎ(view, 24579) && this.ॱˋ.ˎ(view, 24579)) {
                z3 = true;
            } else {
                z3 = false;
            }
            if (z) {
                return z3;
            }
            if (z3) {
                return false;
            }
            return true;
        }

        private boolean ˏ(RecyclerView recyclerView, int i, int i2) {
            View focusedChild = recyclerView.getFocusedChild();
            if (focusedChild == null) {
                return false;
            }
            int ˊˊ = ˊˊ();
            int ˋˋ = ˋˋ();
            int ˋˊ = ˋˊ() - ˋᐝ();
            int ˉ = ˉ() - ˍ();
            Rect rect = this.ॱˎ.ˏॱ;
            ॱ(focusedChild, rect);
            if (rect.left - i >= ˋˊ || rect.right - i <= ˊˊ || rect.top - i2 >= ˉ || rect.bottom - i2 <= ˋˋ) {
                return false;
            }
            return true;
        }

        @Deprecated
        public boolean ˏ(@NonNull RecyclerView recyclerView, @NonNull View view, @Nullable View view2) {
            return ʾ() || recyclerView.ᐝॱ();
        }

        public boolean ˋ(@NonNull RecyclerView recyclerView, @NonNull t tVar, @NonNull View view, @Nullable View view2) {
            return ˏ(recyclerView, view, view2);
        }

        public void ॱ(@Nullable a aVar, @Nullable a aVar2) {
        }

        public boolean ˊ(@NonNull RecyclerView recyclerView, @NonNull ArrayList<View> arrayList, int i, int i2) {
            return false;
        }

        public void ˎ(@NonNull RecyclerView recyclerView) {
        }

        public void ॱ(@NonNull RecyclerView recyclerView, int i, int i2) {
        }

        public void ˊ(@NonNull RecyclerView recyclerView, int i, int i2) {
        }

        public void ˎ(@NonNull RecyclerView recyclerView, int i, int i2) {
        }

        public void ˋ(@NonNull RecyclerView recyclerView, int i, int i2, @Nullable Object obj) {
            ˎ(recyclerView, i, i2);
        }

        public void ˏ(@NonNull RecyclerView recyclerView, int i, int i2, int i3) {
        }

        public int ˎ(@NonNull t tVar) {
            return 0;
        }

        public int ॱ(@NonNull t tVar) {
            return 0;
        }

        public int ʼ(@NonNull t tVar) {
            return 0;
        }

        public int ʽ(@NonNull t tVar) {
            return 0;
        }

        public int ˊ(@NonNull t tVar) {
            return 0;
        }

        public int ʻ(@NonNull t tVar) {
            return 0;
        }

        public void ˏ(@NonNull o oVar, @NonNull t tVar, int i, int i2) {
            this.ॱˎ.ˏ(i, i2);
        }

        public void ʻ(int i, int i2) {
            this.ॱˎ.setMeasuredDimension(i, i2);
        }

        @Px
        public int ͺॱ() {
            return ViewCompat.ॱˊ(this.ॱˎ);
        }

        @Px
        public int ˏˎ() {
            return ViewCompat.ˋॱ(this.ॱˎ);
        }

        @Nullable
        public Parcelable ˊ() {
            return null;
        }

        public void ॱ(Parcelable parcelable) {
        }

        void ˎˏ() {
            if (this.ʻॱ != null) {
                this.ʻॱ.ᐝ();
            }
        }

        void ˏ(q qVar) {
            if (this.ʻॱ == qVar) {
                this.ʻॱ = null;
            }
        }

        public void ˊॱ(int i) {
        }

        public void ˏ(@NonNull o oVar) {
            for (int ˈ = ˈ() - 1; ˈ >= 0; ˈ--) {
                if (!RecyclerView.ˏ(ᐝ(ˈ)).G_()) {
                    ˊ(ˈ, oVar);
                }
            }
        }

        public void ˏ(in inVar) {
            ˏ(this.ॱˎ.ˋ, this.ॱˎ.ˋˊ, inVar);
        }

        public void ˏ(@NonNull o oVar, @NonNull t tVar, @NonNull in inVar) {
            if (this.ॱˎ.canScrollVertically(-1) || this.ॱˎ.canScrollHorizontally(-1)) {
                inVar.ˊ(8192);
                inVar.ˏॱ(true);
            }
            if (this.ॱˎ.canScrollVertically(1) || this.ॱˎ.canScrollHorizontally(1)) {
                inVar.ˊ(4096);
                inVar.ˏॱ(true);
            }
            inVar.ˏ(o.in.a.ˊ(ˎ(oVar, tVar), ˊ(oVar, tVar), ॱ(oVar, tVar), ˏ(oVar, tVar)));
        }

        public void ˊ(@NonNull AccessibilityEvent accessibilityEvent) {
            ˎ(this.ॱˎ.ˋ, this.ॱˎ.ˋˊ, accessibilityEvent);
        }

        public void ˎ(@NonNull o oVar, @NonNull t tVar, @NonNull AccessibilityEvent accessibilityEvent) {
            boolean z = true;
            if (this.ॱˎ != null && accessibilityEvent != null) {
                if (!(this.ॱˎ.canScrollVertically(1) || this.ॱˎ.canScrollVertically(-1) || this.ॱˎ.canScrollHorizontally(-1) || this.ॱˎ.canScrollHorizontally(1))) {
                    z = false;
                }
                accessibilityEvent.setScrollable(z);
                if (this.ॱˎ.ˊॱ != null) {
                    accessibilityEvent.setItemCount(this.ॱˎ.ˊॱ.ˏ());
                }
            }
        }

        public void ˏ(View view, in inVar) {
            s ˏ = RecyclerView.ˏ(view);
            if (ˏ != null && !ˏ.ʻॱ() && !this.ᐝॱ.ˋ(ˏ.ˊ)) {
                ˊ(this.ॱˎ.ˋ, this.ॱˎ.ˋˊ, view, inVar);
            }
        }

        public void ˊ(@NonNull o oVar, @NonNull t tVar, @NonNull View view, @NonNull in inVar) {
            int ˎ;
            int ˎ2 = ʼ() ? ˎ(view) : 0;
            if (ʻ()) {
                ˎ = ˎ(view);
            } else {
                ˎ = 0;
            }
            inVar.ˋ(o.in.e.ॱ(ˎ2, 1, ˎ, 1, false, false));
        }

        public void ˑ() {
            this.ʼॱ = true;
        }

        public int ˏ(@NonNull o oVar, @NonNull t tVar) {
            return 0;
        }

        public int ˎ(@NonNull o oVar, @NonNull t tVar) {
            if (this.ॱˎ == null || this.ॱˎ.ˊॱ == null || !ʼ()) {
                return 1;
            }
            return this.ॱˎ.ˊॱ.ˏ();
        }

        public int ˊ(@NonNull o oVar, @NonNull t tVar) {
            if (this.ॱˎ == null || this.ॱˎ.ˊॱ == null || !ʻ()) {
                return 1;
            }
            return this.ॱˎ.ˊॱ.ˏ();
        }

        public boolean ॱ(@NonNull o oVar, @NonNull t tVar) {
            return false;
        }

        public boolean ˊ(int i, @Nullable Bundle bundle) {
            return ॱ(this.ॱˎ.ˋ, this.ॱˎ.ˋˊ, i, bundle);
        }

        /* JADX WARNING: inconsistent code. */
        /* Code decompiled incorrectly, please refer to instructions dump. */
        public boolean ॱ(@androidx.annotation.NonNull androidx.recyclerview.widget.RecyclerView.o r7, @androidx.annotation.NonNull androidx.recyclerview.widget.RecyclerView.t r8, int r9, @androidx.annotation.Nullable android.os.Bundle r10) {
            /*
            r6 = this;
            r4 = -1;
            r2 = 1;
            r1 = 0;
            r0 = r6.ॱˎ;
            if (r0 != 0) goto L_0x0008;
        L_0x0007:
            return r1;
        L_0x0008:
            switch(r9) {
                case 4096: goto L_0x004a;
                case 8192: goto L_0x0018;
                default: goto L_0x000b;
            };
        L_0x000b:
            r0 = r1;
            r3 = r1;
        L_0x000d:
            if (r3 != 0) goto L_0x0011;
        L_0x000f:
            if (r0 == 0) goto L_0x0007;
        L_0x0011:
            r1 = r6.ॱˎ;
            r1.ˊ(r0, r3);
            r1 = r2;
            goto L_0x0007;
        L_0x0018:
            r0 = r6.ॱˎ;
            r0 = r0.canScrollVertically(r4);
            if (r0 == 0) goto L_0x007f;
        L_0x0020:
            r0 = r6.ˉ();
            r3 = r6.ˋˋ();
            r0 = r0 - r3;
            r3 = r6.ˍ();
            r0 = r0 - r3;
            r0 = -r0;
        L_0x002f:
            r3 = r6.ॱˎ;
            r3 = r3.canScrollHorizontally(r4);
            if (r3 == 0) goto L_0x007a;
        L_0x0037:
            r3 = r6.ˋˊ();
            r4 = r6.ˊˊ();
            r3 = r3 - r4;
            r4 = r6.ˋᐝ();
            r3 = r3 - r4;
            r3 = -r3;
            r5 = r3;
            r3 = r0;
            r0 = r5;
            goto L_0x000d;
        L_0x004a:
            r0 = r6.ॱˎ;
            r0 = r0.canScrollVertically(r2);
            if (r0 == 0) goto L_0x007d;
        L_0x0052:
            r0 = r6.ˉ();
            r3 = r6.ˋˋ();
            r0 = r0 - r3;
            r3 = r6.ˍ();
            r0 = r0 - r3;
        L_0x0060:
            r3 = r6.ॱˎ;
            r3 = r3.canScrollHorizontally(r2);
            if (r3 == 0) goto L_0x007a;
        L_0x0068:
            r3 = r6.ˋˊ();
            r4 = r6.ˊˊ();
            r3 = r3 - r4;
            r4 = r6.ˋᐝ();
            r3 = r3 - r4;
            r5 = r3;
            r3 = r0;
            r0 = r5;
            goto L_0x000d;
        L_0x007a:
            r3 = r0;
            r0 = r1;
            goto L_0x000d;
        L_0x007d:
            r0 = r1;
            goto L_0x0060;
        L_0x007f:
            r0 = r1;
            goto L_0x002f;
            */
            throw new UnsupportedOperationException("Method not decompiled: androidx.recyclerview.widget.RecyclerView.j.ॱ(androidx.recyclerview.widget.RecyclerView$o, androidx.recyclerview.widget.RecyclerView$t, int, android.os.Bundle):boolean");
        }

        public boolean ॱ(@NonNull View view, int i, @Nullable Bundle bundle) {
            return ˊ(this.ॱˎ.ˋ, this.ॱˎ.ˋˊ, view, i, bundle);
        }

        public boolean ˊ(@NonNull o oVar, @NonNull t tVar, @NonNull View view, int i, @Nullable Bundle bundle) {
            return false;
        }

        public static a ॱ(@NonNull Context context, @Nullable AttributeSet attributeSet, int i, int i2) {
            a aVar = new a();
            TypedArray obtainStyledAttributes = context.obtainStyledAttributes(attributeSet, o.ly.e.ʼ, i, i2);
            aVar.ˋ = obtainStyledAttributes.getInt(o.ly.e.ᐝ, 1);
            aVar.ॱ = obtainStyledAttributes.getInt(o.ly.e.ˏॱ, 1);
            aVar.ˊ = obtainStyledAttributes.getBoolean(o.ly.e.ॱˊ, false);
            aVar.ˎ = obtainStyledAttributes.getBoolean(o.ly.e.ͺ, false);
            obtainStyledAttributes.recycle();
            return aVar;
        }

        void ॱॱ(RecyclerView recyclerView) {
            ˋ(MeasureSpec.makeMeasureSpec(recyclerView.getWidth(), 1073741824), MeasureSpec.makeMeasureSpec(recyclerView.getHeight(), 1073741824));
        }

        boolean ˏॱ() {
            return false;
        }

        boolean ˏˏ() {
            int ˈ = ˈ();
            for (int i = 0; i < ˈ; i++) {
                android.view.ViewGroup.LayoutParams layoutParams = ᐝ(i).getLayoutParams();
                if (layoutParams.width < 0 && layoutParams.height < 0) {
                    return true;
                }
            }
            return false;
        }
    }

    public static class EdgeEffectFactory {
        @NonNull
        protected EdgeEffect ˏ(@NonNull RecyclerView recyclerView, int i) {
            return new EdgeEffect(recyclerView.getContext());
        }
    }

    public static abstract class ItemAnimator {
        private ArrayList<b> ˊ = new ArrayList();
        private d ˋ = null;
        private long ˎ = 120;
        private long ˏ = 250;
        private long ॱ = 120;
        private long ॱॱ = 250;

        public static class c {
            public int ˊ;
            public int ˋ;
            public int ˏ;
            public int ॱ;

            @NonNull
            public c ˋ(@NonNull s sVar) {
                return ˏ(sVar, 0);
            }

            @NonNull
            public c ˏ(@NonNull s sVar, int i) {
                View view = sVar.ˊ;
                this.ˏ = view.getLeft();
                this.ˊ = view.getTop();
                this.ˋ = view.getRight();
                this.ॱ = view.getBottom();
                return this;
            }
        }

        public abstract void ˊ(@NonNull s sVar);

        public abstract boolean ˊ(@NonNull s sVar, @Nullable c cVar, @NonNull c cVar2);

        public abstract void ˋ();

        public abstract boolean ˋ(@NonNull s sVar, @NonNull c cVar, @NonNull c cVar2);

        public abstract boolean ˋ(@NonNull s sVar, @NonNull s sVar2, @NonNull c cVar, @NonNull c cVar2);

        public abstract void ˏ();

        public abstract boolean ˏ(@NonNull s sVar, @NonNull c cVar, @Nullable c cVar2);

        public abstract boolean ॱ();

        public long ˎ() {
            return this.ˏ;
        }

        public long ʽ() {
            return this.ˎ;
        }

        public long ʼ() {
            return this.ॱ;
        }

        public long ॱॱ() {
            return this.ॱॱ;
        }

        void ˎ(d dVar) {
            this.ˋ = dVar;
        }

        @NonNull
        public c ˊ(@NonNull t tVar, @NonNull s sVar, int i, @NonNull List<Object> list) {
            return ʻ().ˋ(sVar);
        }

        @NonNull
        public c ˊ(@NonNull t tVar, @NonNull s sVar) {
            return ʻ().ˋ(sVar);
        }

        static int ˏ(s sVar) {
            int i = sVar.ʻ & 14;
            if (sVar.ॱˊ()) {
                return 4;
            }
            if ((i & 4) != 0) {
                return i;
            }
            int ᐝ = sVar.ᐝ();
            int ˋ = sVar.ˋ();
            if (ᐝ == -1 || ˋ == -1 || ᐝ == ˋ) {
                return i;
            }
            return i | 2048;
        }

        public final void ʽ(@NonNull s sVar) {
            ᐝ(sVar);
            if (this.ˋ != null) {
                this.ˋ.ˎ(sVar);
            }
        }

        public void ᐝ(@NonNull s sVar) {
        }

        public final boolean ॱ(@Nullable b bVar) {
            boolean ॱ = ॱ();
            if (bVar != null) {
                if (ॱ) {
                    this.ˊ.add(bVar);
                } else {
                    bVar.ˏ();
                }
            }
            return ॱ;
        }

        public boolean ॱॱ(@NonNull s sVar) {
            return true;
        }

        public boolean ˋ(@NonNull s sVar, @NonNull List<Object> list) {
            return ॱॱ(sVar);
        }

        public final void ᐝ() {
            int size = this.ˊ.size();
            for (int i = 0; i < size; i++) {
                ((b) this.ˊ.get(i)).ˏ();
            }
            this.ˊ.clear();
        }

        @NonNull
        public c ʻ() {
            return new c();
        }
    }

    public static class LayoutParams extends MarginLayoutParams {
        boolean ʻ = false;
        boolean ˋ = true;
        s ˎ;
        final Rect ˏ = new Rect();

        public LayoutParams(Context context, AttributeSet attributeSet) {
            super(context, attributeSet);
        }

        public LayoutParams(int i, int i2) {
            super(i, i2);
        }

        public LayoutParams(MarginLayoutParams marginLayoutParams) {
            super(marginLayoutParams);
        }

        public LayoutParams(android.view.ViewGroup.LayoutParams layoutParams) {
            super(layoutParams);
        }

        public LayoutParams(LayoutParams layoutParams) {
            super(layoutParams);
        }

        public boolean ˋ() {
            return this.ˎ.ॱˊ();
        }

        public boolean ॱ() {
            return this.ˎ.ʻॱ();
        }

        public boolean ˎ() {
            return this.ˎ.ˊᐝ();
        }

        public int ʻ() {
            return this.ˎ.ˏ();
        }
    }

    @RestrictTo({RestrictTo.d.ˊ})
    public static class SavedState extends AbsSavedState {
        public static final Creator<SavedState> CREATOR = new ClassLoaderCreator<SavedState>() {
            public /* synthetic */ Object createFromParcel(Parcel parcel) {
                return ˎ(parcel);
            }

            public /* synthetic */ Object createFromParcel(Parcel parcel, ClassLoader classLoader) {
                return ˎ(parcel, classLoader);
            }

            public /* synthetic */ Object[] newArray(int i) {
                return ˊ(i);
            }

            public SavedState ˎ(Parcel parcel, ClassLoader classLoader) {
                return new SavedState(parcel, classLoader);
            }

            public SavedState ˎ(Parcel parcel) {
                return new SavedState(parcel, null);
            }

            public SavedState[] ˊ(int i) {
                return new SavedState[i];
            }
        };
        Parcelable ˋ;

        SavedState(Parcel parcel, ClassLoader classLoader) {
            super(parcel, classLoader);
            if (classLoader == null) {
                classLoader = j.class.getClassLoader();
            }
            this.ˋ = parcel.readParcelable(classLoader);
        }

        SavedState(Parcelable parcelable) {
            super(parcelable);
        }

        public void writeToParcel(Parcel parcel, int i) {
            super.writeToParcel(parcel, i);
            parcel.writeParcelable(this.ˋ, 0);
        }

        void ॱ(SavedState savedState) {
            this.ˋ = savedState.ˋ;
        }
    }

    public static abstract class a<VH extends s> {
        private boolean ˊ = false;
        private final b ˏ = new b();

        @NonNull
        public abstract VH ˎ(@NonNull ViewGroup viewGroup, int i);

        public abstract int ˏ();

        public abstract void ॱ(@NonNull VH vh, int i);

        public void ˋ(@NonNull VH vh, int i, @NonNull List<Object> list) {
            ॱ((s) vh, i);
        }

        @NonNull
        public final VH ˋ(@NonNull ViewGroup viewGroup, int i) {
            try {
                gp.ˏ("RV CreateView");
                VH ˎ = ˎ(viewGroup, i);
                if (ˎ.ˊ.getParent() != null) {
                    throw new IllegalStateException("ViewHolder views must not be attached when created. Ensure that you are not passing 'true' to the attachToRoot parameter of LayoutInflater.inflate(..., boolean attachToRoot)");
                }
                ˎ.ॱॱ = i;
                return ˎ;
            } finally {
                gp.ˊ();
            }
        }

        public final void ˋ(@NonNull VH vh, int i) {
            vh.ˎ = i;
            if (ˋ()) {
                vh.ˏ = ˏ(i);
            }
            vh.ˊ(1, 519);
            gp.ˏ("RV OnBindView");
            ˋ(vh, i, vh.ʽॱ());
            vh.ॱˎ();
            android.view.ViewGroup.LayoutParams layoutParams = vh.ˊ.getLayoutParams();
            if (layoutParams instanceof LayoutParams) {
                ((LayoutParams) layoutParams).ˋ = true;
            }
            gp.ˊ();
        }

        public int ˎ(int i) {
            return 0;
        }

        public void ˋ(boolean z) {
            if (ˎ()) {
                throw new IllegalStateException("Cannot change whether this adapter has stable IDs while the adapter has registered observers.");
            }
            this.ˊ = z;
        }

        public long ˏ(int i) {
            return -1;
        }

        public final boolean ˋ() {
            return this.ˊ;
        }

        public void ˏ(@NonNull VH vh) {
        }

        public boolean ˊ(@NonNull VH vh) {
            return false;
        }

        public void ˎ(@NonNull VH vh) {
        }

        public void ॱ(@NonNull VH vh) {
        }

        public final boolean ˎ() {
            return this.ˏ.ˎ();
        }

        public void ˋ(@NonNull c cVar) {
            this.ˏ.registerObserver(cVar);
        }

        public void ˊ(@NonNull c cVar) {
            this.ˏ.unregisterObserver(cVar);
        }

        public void ˋ(@NonNull RecyclerView recyclerView) {
        }

        public void ॱ(@NonNull RecyclerView recyclerView) {
        }

        public final void ˊ() {
            this.ˏ.ˏ();
        }

        public final void ˊ(int i) {
            this.ˏ.ˏ(i, 1);
        }

        public final void ˊ(int i, @Nullable Object obj) {
            this.ˏ.ॱ(i, 1, obj);
        }

        public final void ॱ(int i, int i2) {
            this.ˏ.ˏ(i, i2);
        }

        public final void ॱ(int i) {
            this.ˏ.ॱ(i, 1);
        }

        public final void ˋ(int i, int i2) {
            this.ˏ.ˎ(i, i2);
        }

        public final void ˋ(int i) {
            this.ˏ.ˊ(i, 1);
        }
    }

    static class b extends Observable<c> {
        b() {
        }

        public boolean ˎ() {
            return !this.mObservers.isEmpty();
        }

        public void ˏ() {
            for (int size = this.mObservers.size() - 1; size >= 0; size--) {
                ((c) this.mObservers.get(size)).ˋ();
            }
        }

        public void ˏ(int i, int i2) {
            ॱ(i, i2, null);
        }

        public void ॱ(int i, int i2, @Nullable Object obj) {
            for (int size = this.mObservers.size() - 1; size >= 0; size--) {
                ((c) this.mObservers.get(size)).ˎ(i, i2, obj);
            }
        }

        public void ॱ(int i, int i2) {
            for (int size = this.mObservers.size() - 1; size >= 0; size--) {
                ((c) this.mObservers.get(size)).ˏ(i, i2);
            }
        }

        public void ˊ(int i, int i2) {
            for (int size = this.mObservers.size() - 1; size >= 0; size--) {
                ((c) this.mObservers.get(size)).ˋ(i, i2);
            }
        }

        public void ˎ(int i, int i2) {
            for (int size = this.mObservers.size() - 1; size >= 0; size--) {
                ((c) this.mObservers.get(size)).ˏ(i, i2, 1);
            }
        }
    }

    public static abstract class c {
        public void ˋ() {
        }

        public void ˎ(int i, int i2) {
        }

        public void ˎ(int i, int i2, @Nullable Object obj) {
            ˎ(i, i2);
        }

        public void ˏ(int i, int i2) {
        }

        public void ˋ(int i, int i2) {
        }

        public void ˏ(int i, int i2, int i3) {
        }
    }

    public interface e {
        int ॱ(int i, int i2);
    }

    public static abstract class f {
        public void ˊ(@NonNull Canvas canvas, @NonNull RecyclerView recyclerView, @NonNull t tVar) {
            ˊ(canvas, recyclerView);
        }

        @Deprecated
        public void ˊ(@NonNull Canvas canvas, @NonNull RecyclerView recyclerView) {
        }

        public void ˋ(@NonNull Canvas canvas, @NonNull RecyclerView recyclerView, @NonNull t tVar) {
            ॱ(canvas, recyclerView);
        }

        @Deprecated
        public void ॱ(@NonNull Canvas canvas, @NonNull RecyclerView recyclerView) {
        }

        @Deprecated
        public void ॱ(@NonNull Rect rect, int i, @NonNull RecyclerView recyclerView) {
            rect.set(0, 0, 0, 0);
        }

        public void ˏ(@NonNull Rect rect, @NonNull View view, @NonNull RecyclerView recyclerView, @NonNull t tVar) {
            ॱ(rect, ((LayoutParams) view.getLayoutParams()).ʻ(), recyclerView);
        }
    }

    public interface g {
        boolean ˋ(@NonNull RecyclerView recyclerView, @NonNull MotionEvent motionEvent);

        void ˎ(boolean z);

        void ॱ(@NonNull RecyclerView recyclerView, @NonNull MotionEvent motionEvent);
    }

    public interface h {
        void ˋ(@NonNull View view);

        void ˎ(@NonNull View view);
    }

    public static abstract class i {
        public abstract boolean ˎ(int i, int i2);
    }

    class k extends c {
        final /* synthetic */ RecyclerView ˏ;

        k(RecyclerView recyclerView) {
            this.ˏ = recyclerView;
        }

        public void ˋ() {
            this.ˏ.ˊ(null);
            this.ˏ.ˋˊ.ॱॱ = true;
            this.ˏ.ˊ(true);
            if (!this.ˏ.ॱॱ.ˎ()) {
                this.ˏ.requestLayout();
            }
        }

        public void ˎ(int i, int i2, Object obj) {
            this.ˏ.ˊ(null);
            if (this.ˏ.ॱॱ.ˊ(i, i2, obj)) {
                ˎ();
            }
        }

        public void ˏ(int i, int i2) {
            this.ˏ.ˊ(null);
            if (this.ˏ.ॱॱ.ˏ(i, i2)) {
                ˎ();
            }
        }

        public void ˋ(int i, int i2) {
            this.ˏ.ˊ(null);
            if (this.ˏ.ॱॱ.ˋ(i, i2)) {
                ˎ();
            }
        }

        public void ˏ(int i, int i2, int i3) {
            this.ˏ.ˊ(null);
            if (this.ˏ.ॱॱ.ˋ(i, i2, i3)) {
                ˎ();
            }
        }

        void ˎ() {
            if (RecyclerView.ˎ && this.ˏ.ॱˋ && this.ˏ.ॱᐝ) {
                ViewCompat.ˏ(this.ˏ, this.ˏ.ʽ);
                return;
            }
            this.ˏ.ʿ = true;
            this.ˏ.requestLayout();
        }
    }

    public interface l {
        void ˏ(@NonNull s sVar);
    }

    public static class m {
        private int ˊ = 0;
        SparseArray<e> ˏ = new SparseArray();

        static class e {
            final ArrayList<s> ˊ = new ArrayList();
            long ˋ = 0;
            int ˎ = 5;
            long ˏ = 0;

            e() {
            }
        }

        public void ˋ() {
            for (int i = 0; i < this.ˏ.size(); i++) {
                ((e) this.ˏ.valueAt(i)).ˊ.clear();
            }
        }

        @Nullable
        public s ˏ(int i) {
            e eVar = (e) this.ˏ.get(i);
            if (eVar == null || eVar.ˊ.isEmpty()) {
                return null;
            }
            ArrayList arrayList = eVar.ˊ;
            return (s) arrayList.remove(arrayList.size() - 1);
        }

        public void ˊ(s sVar) {
            int ॱॱ = sVar.ॱॱ();
            ArrayList arrayList = ॱ(ॱॱ).ˊ;
            if (((e) this.ˏ.get(ॱॱ)).ˎ > arrayList.size()) {
                sVar.ʾ();
                arrayList.add(sVar);
            }
        }

        long ˏ(long j, long j2) {
            return j == 0 ? j2 : ((j / 4) * 3) + (j2 / 4);
        }

        void ˊ(int i, long j) {
            e ॱ = ॱ(i);
            ॱ.ˏ = ˏ(ॱ.ˏ, j);
        }

        void ॱ(int i, long j) {
            e ॱ = ॱ(i);
            ॱ.ˋ = ˏ(ॱ.ˋ, j);
        }

        boolean ˏ(int i, long j, long j2) {
            long j3 = ॱ(i).ˏ;
            return j3 == 0 || j3 + j < j2;
        }

        boolean ˋ(int i, long j, long j2) {
            long j3 = ॱ(i).ˋ;
            return j3 == 0 || j3 + j < j2;
        }

        void ˎ() {
            this.ˊ++;
        }

        void ˊ() {
            this.ˊ--;
        }

        void ॱ(a aVar, a aVar2, boolean z) {
            if (aVar != null) {
                ˊ();
            }
            if (!z && this.ˊ == 0) {
                ˋ();
            }
            if (aVar2 != null) {
                ˎ();
            }
        }

        private e ॱ(int i) {
            e eVar = (e) this.ˏ.get(i);
            if (eVar != null) {
                return eVar;
            }
            eVar = new e();
            this.ˏ.put(i, eVar);
            return eVar;
        }
    }

    public static abstract class n {
        public void ˎ(@NonNull RecyclerView recyclerView, int i) {
        }

        public void ˊ(@NonNull RecyclerView recyclerView, int i, int i2) {
        }
    }

    public final class o {
        private int ʻ = 2;
        private r ʽ;
        final ArrayList<s> ˊ = new ArrayList();
        final ArrayList<s> ˋ = new ArrayList();
        ArrayList<s> ˎ = null;
        int ˏ = 2;
        m ॱ;
        final /* synthetic */ RecyclerView ॱॱ;
        private final List<s> ᐝ = Collections.unmodifiableList(this.ˊ);

        public o(RecyclerView recyclerView) {
            this.ॱॱ = recyclerView;
        }

        public void ˋ() {
            this.ˊ.clear();
            ˎ();
        }

        public void ॱ(int i) {
            this.ʻ = i;
            ˊ();
        }

        public void ˊ() {
            this.ˏ = (this.ॱॱ.ˋॱ != null ? this.ॱॱ.ˋॱ.ʾ : 0) + this.ʻ;
            for (int size = this.ˋ.size() - 1; size >= 0 && this.ˋ.size() > this.ˏ; size--) {
                ˋ(size);
            }
        }

        @NonNull
        public List<s> ॱ() {
            return this.ᐝ;
        }

        boolean ˎ(s sVar) {
            if (sVar.ʻॱ()) {
                return this.ॱॱ.ˋˊ.ˋ();
            }
            if (sVar.ˎ < 0 || sVar.ˎ >= this.ॱॱ.ˊॱ.ˏ()) {
                throw new IndexOutOfBoundsException("Inconsistency detected. Invalid view holder adapter position" + sVar + this.ॱॱ.ˎ());
            } else if (!this.ॱॱ.ˋˊ.ˋ() && this.ॱॱ.ˊॱ.ˎ(sVar.ˎ) != sVar.ॱॱ()) {
                return false;
            } else {
                if (!this.ॱॱ.ˊॱ.ˋ() || sVar.ʽ() == this.ॱॱ.ˊॱ.ˏ(sVar.ˎ)) {
                    return true;
                }
                return false;
            }
        }

        private boolean ˏ(@NonNull s sVar, int i, int i2, long j) {
            sVar.ॱˎ = this.ॱॱ;
            int ॱॱ = sVar.ॱॱ();
            long ˊˊ = this.ॱॱ.ˊˊ();
            if (j != Long.MAX_VALUE && !this.ॱ.ˋ(ॱॱ, ˊˊ, j)) {
                return false;
            }
            this.ॱॱ.ˊॱ.ˋ(sVar, i);
            this.ॱ.ॱ(sVar.ॱॱ(), this.ॱॱ.ˊˊ() - ˊˊ);
            ˋ(sVar);
            if (this.ॱॱ.ˋˊ.ˋ()) {
                sVar.ʼ = i2;
            }
            return true;
        }

        public int ˏ(int i) {
            if (i >= 0 && i < this.ॱॱ.ˋˊ.ˏ()) {
                return !this.ॱॱ.ˋˊ.ˋ() ? i : this.ॱॱ.ॱॱ.ˊ(i);
            } else {
                throw new IndexOutOfBoundsException("invalid position " + i + ". State " + "item count is " + this.ॱॱ.ˋˊ.ˏ() + this.ॱॱ.ˎ());
            }
        }

        @NonNull
        public View ˊ(int i) {
            return ˎ(i, false);
        }

        View ˎ(int i, boolean z) {
            return ˋ(i, z, Long.MAX_VALUE).ˊ;
        }

        @Nullable
        public s ˋ(int i, boolean z, long j) {
            boolean z2 = true;
            if (i < 0 || i >= this.ॱॱ.ˋˊ.ˏ()) {
                throw new IndexOutOfBoundsException("Invalid item position " + i + "(" + i + "). Item count:" + this.ॱॱ.ˋˊ.ˏ() + this.ॱॱ.ˎ());
            }
            s ʽ;
            boolean z3;
            s sVar;
            boolean z4;
            LayoutParams layoutParams;
            if (this.ॱॱ.ˋˊ.ˋ()) {
                ʽ = ʽ(i);
                z3 = ʽ != null;
                sVar = ʽ;
            } else {
                sVar = null;
                z3 = false;
            }
            if (sVar == null) {
                sVar = ˊ(i, z);
                if (sVar != null) {
                    if (ˎ(sVar)) {
                        z3 = true;
                    } else {
                        if (!z) {
                            sVar.ˎ(4);
                            if (sVar.ʼ()) {
                                this.ॱॱ.removeDetachedView(sVar.ˊ, false);
                                sVar.ʻ();
                            } else if (sVar.ˋॱ()) {
                                sVar.ˏॱ();
                            }
                            ˊ(sVar);
                        }
                        sVar = null;
                    }
                }
            }
            if (sVar == null) {
                int ˊ = this.ॱॱ.ॱॱ.ˊ(i);
                if (ˊ < 0 || ˊ >= this.ॱॱ.ˊॱ.ˏ()) {
                    throw new IndexOutOfBoundsException("Inconsistency detected. Invalid item position " + i + "(offset:" + ˊ + ")." + "state:" + this.ॱॱ.ˋˊ.ˏ() + this.ॱॱ.ˎ());
                }
                boolean z5;
                View ॱ;
                long ˊˊ;
                RecyclerView ˊॱ;
                int ˎ = this.ॱॱ.ˊॱ.ˎ(ˊ);
                if (this.ॱॱ.ˊॱ.ˋ()) {
                    sVar = ˊ(this.ॱॱ.ˊॱ.ˏ(ˊ), ˎ, z);
                    if (sVar != null) {
                        sVar.ˎ = ˊ;
                        z5 = true;
                        if (sVar == null && this.ʽ != null) {
                            ॱ = this.ʽ.ॱ(this, i, ˎ);
                            if (ॱ != null) {
                                sVar = this.ॱॱ.ॱ(ॱ);
                                if (sVar == null) {
                                    throw new IllegalArgumentException("getViewForPositionAndType returned a view which does not have a ViewHolder" + this.ॱॱ.ˎ());
                                } else if (sVar.G_()) {
                                    throw new IllegalArgumentException("getViewForPositionAndType returned a view that is ignored. You must call stopIgnoring before returning this view." + this.ॱॱ.ˎ());
                                }
                            }
                        }
                        if (sVar == null) {
                            sVar = ॱॱ().ˏ(ˎ);
                            if (sVar != null) {
                                sVar.ʾ();
                                if (RecyclerView.ˏ) {
                                    ʻ(sVar);
                                }
                            }
                        }
                        if (sVar == null) {
                            ˊˊ = this.ॱॱ.ˊˊ();
                            if (j == Long.MAX_VALUE && !this.ॱ.ˏ(ˎ, ˊˊ, j)) {
                                return null;
                            }
                            sVar = this.ॱॱ.ˊॱ.ˋ(this.ॱॱ, ˎ);
                            if (RecyclerView.ॱ) {
                                ˊॱ = RecyclerView.ˊॱ(sVar.ˊ);
                                if (ˊॱ != null) {
                                    sVar.ॱ = new WeakReference(ˊॱ);
                                }
                            }
                            this.ॱ.ˊ(ˎ, this.ॱॱ.ˊˊ() - ˊˊ);
                        }
                        ʽ = sVar;
                        z4 = z5;
                    }
                }
                z5 = z3;
                ॱ = this.ʽ.ॱ(this, i, ˎ);
                if (ॱ != null) {
                    sVar = this.ॱॱ.ॱ(ॱ);
                    if (sVar == null) {
                        throw new IllegalArgumentException("getViewForPositionAndType returned a view which does not have a ViewHolder" + this.ॱॱ.ˎ());
                    } else if (sVar.G_()) {
                        throw new IllegalArgumentException("getViewForPositionAndType returned a view that is ignored. You must call stopIgnoring before returning this view." + this.ॱॱ.ˎ());
                    }
                }
                if (sVar == null) {
                    sVar = ॱॱ().ˏ(ˎ);
                    if (sVar != null) {
                        sVar.ʾ();
                        if (RecyclerView.ˏ) {
                            ʻ(sVar);
                        }
                    }
                }
                if (sVar == null) {
                    ˊˊ = this.ॱॱ.ˊˊ();
                    if (j == Long.MAX_VALUE) {
                    }
                    sVar = this.ॱॱ.ˊॱ.ˋ(this.ॱॱ, ˎ);
                    if (RecyclerView.ॱ) {
                        ˊॱ = RecyclerView.ˊॱ(sVar.ˊ);
                        if (ˊॱ != null) {
                            sVar.ॱ = new WeakReference(ˊॱ);
                        }
                    }
                    this.ॱ.ˊ(ˎ, this.ॱॱ.ˊˊ() - ˊˊ);
                }
                ʽ = sVar;
                z4 = z5;
            } else {
                ʽ = sVar;
                z4 = z3;
            }
            if (z4 && !this.ॱॱ.ˋˊ.ˋ() && ʽ.ˊ(8192)) {
                ʽ.ˊ(0, 8192);
                if (this.ॱॱ.ˋˊ.ʽ) {
                    this.ॱॱ.ˏ(ʽ, this.ॱॱ.ˊˋ.ˊ(this.ॱॱ.ˋˊ, ʽ, ItemAnimator.ˏ(ʽ) | 4096, ʽ.ʽॱ()));
                }
            }
            if (this.ॱॱ.ˋˊ.ˋ() && ʽ.ॱᐝ()) {
                ʽ.ʼ = i;
                z3 = false;
            } else if (!ʽ.ॱᐝ() || ʽ.ͺ() || ʽ.ॱˊ()) {
                z3 = ˏ(ʽ, this.ॱॱ.ॱॱ.ˊ(i), i, j);
            } else {
                z3 = false;
            }
            android.view.ViewGroup.LayoutParams layoutParams2 = ʽ.ˊ.getLayoutParams();
            if (layoutParams2 == null) {
                layoutParams = (LayoutParams) this.ॱॱ.generateDefaultLayoutParams();
                ʽ.ˊ.setLayoutParams(layoutParams);
            } else if (this.ॱॱ.checkLayoutParams(layoutParams2)) {
                layoutParams = (LayoutParams) layoutParams2;
            } else {
                layoutParams = (LayoutParams) this.ॱॱ.generateLayoutParams(layoutParams2);
                ʽ.ˊ.setLayoutParams(layoutParams);
            }
            layoutParams.ˎ = ʽ;
            if (!(z4 && r2)) {
                z2 = false;
            }
            layoutParams.ʻ = z2;
            return ʽ;
        }

        private void ˋ(s sVar) {
            if (this.ॱॱ.ʻॱ()) {
                View view = sVar.ˊ;
                if (ViewCompat.getImportantForAccessibility(view) == 0) {
                    ViewCompat.setImportantForAccessibility(view, 1);
                }
                if (!ViewCompat.ॱ(view)) {
                    sVar.ˎ(16384);
                    ViewCompat.ˏ(view, this.ॱॱ.ˎˎ.ˋ());
                }
            }
        }

        private void ʻ(s sVar) {
            if (sVar.ˊ instanceof ViewGroup) {
                ˋ((ViewGroup) sVar.ˊ, false);
            }
        }

        private void ˋ(ViewGroup viewGroup, boolean z) {
            for (int childCount = viewGroup.getChildCount() - 1; childCount >= 0; childCount--) {
                View childAt = viewGroup.getChildAt(childCount);
                if (childAt instanceof ViewGroup) {
                    ˋ((ViewGroup) childAt, true);
                }
            }
            if (!z) {
                return;
            }
            if (viewGroup.getVisibility() == 4) {
                viewGroup.setVisibility(0);
                viewGroup.setVisibility(4);
                return;
            }
            int visibility = viewGroup.getVisibility();
            viewGroup.setVisibility(4);
            viewGroup.setVisibility(visibility);
        }

        public void ˊ(@NonNull View view) {
            s ˏ = RecyclerView.ˏ(view);
            if (ˏ.ॱˋ()) {
                this.ॱॱ.removeDetachedView(view, false);
            }
            if (ˏ.ʼ()) {
                ˏ.ʻ();
            } else if (ˏ.ˋॱ()) {
                ˏ.ˏॱ();
            }
            ˊ(ˏ);
        }

        void ˎ() {
            for (int size = this.ˋ.size() - 1; size >= 0; size--) {
                ˋ(size);
            }
            this.ˋ.clear();
            if (RecyclerView.ॱ) {
                this.ॱॱ.ˉ.ॱ();
            }
        }

        void ˋ(int i) {
            ˊ((s) this.ˋ.get(i), true);
            this.ˋ.remove(i);
        }

        void ˊ(s sVar) {
            int i = 0;
            if (sVar.ʼ() || sVar.ˊ.getParent() != null) {
                throw new IllegalArgumentException("Scrapped or attached views may not be recycled. isScrap:" + sVar.ʼ() + " isAttached:" + (sVar.ˊ.getParent() != null) + this.ॱॱ.ˎ());
            } else if (sVar.ॱˋ()) {
                throw new IllegalArgumentException("Tmp detached view should be removed from RecyclerView before it can be recycled: " + sVar + this.ॱॱ.ˎ());
            } else if (sVar.G_()) {
                throw new IllegalArgumentException("Trying to recycle an ignored view holder. You should first call stopIgnoringView(view) before calling recycle." + this.ॱॱ.ˎ());
            } else {
                int size;
                boolean ʼॱ = sVar.ʼॱ();
                boolean z = this.ॱॱ.ˊॱ != null && ʼॱ && this.ॱॱ.ˊॱ.ˊ(sVar);
                if (z || sVar.ʿ()) {
                    if (this.ˏ <= 0 || sVar.ˊ(526)) {
                        z = false;
                    } else {
                        size = this.ˋ.size();
                        if (size >= this.ˏ && size > 0) {
                            ˋ(0);
                            size--;
                        }
                        if (RecyclerView.ॱ && size > 0 && !this.ॱॱ.ˉ.ˊ(sVar.ˎ)) {
                            int i2 = size - 1;
                            while (i2 >= 0) {
                                if (!this.ॱॱ.ˉ.ˊ(((s) this.ˋ.get(i2)).ˎ)) {
                                    break;
                                }
                                i2--;
                            }
                            size = i2 + 1;
                        }
                        this.ˋ.add(size, sVar);
                        size = true;
                    }
                    if (!size != false) {
                        ˊ(sVar, true);
                        i = 1;
                    }
                } else {
                    size = 0;
                }
                this.ॱॱ.ᐝ.ʽ(sVar);
                if (size == 0 && r2 == 0 && ʼॱ) {
                    sVar.ॱˎ = null;
                }
            }
        }

        public void ˊ(@NonNull s sVar, boolean z) {
            RecyclerView.ˏ(sVar);
            if (sVar.ˊ(16384)) {
                sVar.ˊ(0, 16384);
                ViewCompat.ˏ(sVar.ˊ, null);
            }
            if (z) {
                ˏ(sVar);
            }
            sVar.ॱˎ = null;
            ॱॱ().ˊ(sVar);
        }

        void ˎ(View view) {
            s ˏ = RecyclerView.ˏ(view);
            ˏ.ͺ = null;
            ˏ.ˏॱ = false;
            ˏ.ˏॱ();
            ˊ(ˏ);
        }

        void ˋ(View view) {
            s ˏ = RecyclerView.ˏ(view);
            if (!ˏ.ˊ(12) && ˏ.ˊᐝ() && !this.ॱॱ.ˋ(ˏ)) {
                if (this.ˎ == null) {
                    this.ˎ = new ArrayList();
                }
                ˏ.ॱ(this, true);
                this.ˎ.add(ˏ);
            } else if (!ˏ.ॱˊ() || ˏ.ʻॱ() || this.ॱॱ.ˊॱ.ˋ()) {
                ˏ.ॱ(this, false);
                this.ˊ.add(ˏ);
            } else {
                throw new IllegalArgumentException("Called scrap view with an invalid view. Invalid views cannot be reused from scrap, they should rebound from recycler pool." + this.ॱॱ.ˎ());
            }
        }

        void ॱ(s sVar) {
            if (sVar.ˏॱ) {
                this.ˎ.remove(sVar);
            } else {
                this.ˊ.remove(sVar);
            }
            sVar.ͺ = null;
            sVar.ˏॱ = false;
            sVar.ˏॱ();
        }

        int ˏ() {
            return this.ˊ.size();
        }

        View ˎ(int i) {
            return ((s) this.ˊ.get(i)).ˊ;
        }

        void ᐝ() {
            this.ˊ.clear();
            if (this.ˎ != null) {
                this.ˎ.clear();
            }
        }

        s ʽ(int i) {
            int i2 = 0;
            if (this.ˎ != null) {
                int size = this.ˎ.size();
                if (size != 0) {
                    s sVar;
                    int i3 = 0;
                    while (i3 < size) {
                        sVar = (s) this.ˎ.get(i3);
                        if (sVar.ˋॱ() || sVar.ˏ() != i) {
                            i3++;
                        } else {
                            sVar.ˎ(32);
                            return sVar;
                        }
                    }
                    if (this.ॱॱ.ˊॱ.ˋ()) {
                        int ˊ = this.ॱॱ.ॱॱ.ˊ(i);
                        if (ˊ > 0 && ˊ < this.ॱॱ.ˊॱ.ˏ()) {
                            long ˏ = this.ॱॱ.ˊॱ.ˏ(ˊ);
                            while (i2 < size) {
                                sVar = (s) this.ˎ.get(i2);
                                if (sVar.ˋॱ() || sVar.ʽ() != ˏ) {
                                    i2++;
                                } else {
                                    sVar.ˎ(32);
                                    return sVar;
                                }
                            }
                        }
                    }
                    return null;
                }
            }
            return null;
        }

        s ˊ(int i, boolean z) {
            int i2 = 0;
            int size = this.ˊ.size();
            int i3 = 0;
            while (i3 < size) {
                s sVar = (s) this.ˊ.get(i3);
                if (sVar.ˋॱ() || sVar.ˏ() != i || sVar.ॱˊ() || (!this.ॱॱ.ˋˊ.ʼ && sVar.ʻॱ())) {
                    i3++;
                } else {
                    sVar.ˎ(32);
                    return sVar;
                }
            }
            if (!z) {
                View ˏ = this.ॱॱ.ʼ.ˏ(i);
                if (ˏ != null) {
                    sVar = RecyclerView.ˏ(ˏ);
                    this.ॱॱ.ʼ.ˊ(ˏ);
                    i2 = this.ॱॱ.ʼ.ॱ(ˏ);
                    if (i2 == -1) {
                        throw new IllegalStateException("layout index should not be -1 after unhiding a view:" + sVar + this.ॱॱ.ˎ());
                    }
                    this.ॱॱ.ʼ.ˊ(i2);
                    ˋ(ˏ);
                    sVar.ˎ(8224);
                    return sVar;
                }
            }
            i3 = this.ˋ.size();
            while (i2 < i3) {
                sVar = (s) this.ˋ.get(i2);
                if (sVar.ॱˊ() || sVar.ˏ() != i) {
                    i2++;
                } else if (z) {
                    return sVar;
                } else {
                    this.ˋ.remove(i2);
                    return sVar;
                }
            }
            return null;
        }

        s ˊ(long j, int i, boolean z) {
            int size;
            for (size = this.ˊ.size() - 1; size >= 0; size--) {
                s sVar = (s) this.ˊ.get(size);
                if (sVar.ʽ() == j && !sVar.ˋॱ()) {
                    if (i == sVar.ॱॱ()) {
                        sVar.ˎ(32);
                        if (!sVar.ʻॱ() || this.ॱॱ.ˋˊ.ˋ()) {
                            return sVar;
                        }
                        sVar.ˊ(2, 14);
                        return sVar;
                    } else if (!z) {
                        this.ˊ.remove(size);
                        this.ॱॱ.removeDetachedView(sVar.ˊ, false);
                        ˎ(sVar.ˊ);
                    }
                }
            }
            for (size = this.ˋ.size() - 1; size >= 0; size--) {
                sVar = (s) this.ˋ.get(size);
                if (sVar.ʽ() == j) {
                    if (i == sVar.ॱॱ()) {
                        if (z) {
                            return sVar;
                        }
                        this.ˋ.remove(size);
                        return sVar;
                    } else if (!z) {
                        ˋ(size);
                        return null;
                    }
                }
            }
            return null;
        }

        void ˏ(@NonNull s sVar) {
            if (this.ॱॱ.ͺ != null) {
                this.ॱॱ.ͺ.ˏ(sVar);
            }
            if (this.ॱॱ.ˊॱ != null) {
                this.ॱॱ.ˊॱ.ˏ(sVar);
            }
            if (this.ॱॱ.ˋˊ != null) {
                this.ॱॱ.ᐝ.ʽ(sVar);
            }
        }

        void ˋ(a aVar, a aVar2, boolean z) {
            ˋ();
            ॱॱ().ॱ(aVar, aVar2, z);
        }

        void ˊ(int i, int i2) {
            int i3;
            int i4;
            int i5;
            if (i < i2) {
                i3 = -1;
                i4 = i2;
                i5 = i;
            } else {
                i3 = 1;
                i4 = i;
                i5 = i2;
            }
            int size = this.ˋ.size();
            for (int i6 = 0; i6 < size; i6++) {
                s sVar = (s) this.ˋ.get(i6);
                if (sVar != null && sVar.ˎ >= r3 && sVar.ˎ <= r2) {
                    if (sVar.ˎ == i) {
                        sVar.ˎ(i2 - i, false);
                    } else {
                        sVar.ˎ(i3, false);
                    }
                }
            }
        }

        void ˎ(int i, int i2) {
            int size = this.ˋ.size();
            for (int i3 = 0; i3 < size; i3++) {
                s sVar = (s) this.ˋ.get(i3);
                if (sVar != null && sVar.ˎ >= i) {
                    sVar.ˎ(i2, true);
                }
            }
        }

        void ˎ(int i, int i2, boolean z) {
            int i3 = i + i2;
            for (int size = this.ˋ.size() - 1; size >= 0; size--) {
                s sVar = (s) this.ˋ.get(size);
                if (sVar != null) {
                    if (sVar.ˎ >= i3) {
                        sVar.ˎ(-i2, z);
                    } else if (sVar.ˎ >= i) {
                        sVar.ˎ(8);
                        ˋ(size);
                    }
                }
            }
        }

        void ˋ(r rVar) {
            this.ʽ = rVar;
        }

        void ˋ(m mVar) {
            if (this.ॱ != null) {
                this.ॱ.ˊ();
            }
            this.ॱ = mVar;
            if (this.ॱ != null && this.ॱॱ.ˋ() != null) {
                this.ॱ.ˎ();
            }
        }

        m ॱॱ() {
            if (this.ॱ == null) {
                this.ॱ = new m();
            }
            return this.ॱ;
        }

        void ॱ(int i, int i2) {
            int i3 = i + i2;
            for (int size = this.ˋ.size() - 1; size >= 0; size--) {
                s sVar = (s) this.ˋ.get(size);
                if (sVar != null) {
                    int i4 = sVar.ˎ;
                    if (i4 >= i && i4 < i3) {
                        sVar.ˎ(2);
                        ˋ(size);
                    }
                }
            }
        }

        void ʽ() {
            int size = this.ˋ.size();
            for (int i = 0; i < size; i++) {
                s sVar = (s) this.ˋ.get(i);
                if (sVar != null) {
                    sVar.ˎ(6);
                    sVar.ˏ(null);
                }
            }
            if (this.ॱॱ.ˊॱ == null || !this.ॱॱ.ˊॱ.ˋ()) {
                ˎ();
            }
        }

        void ʻ() {
            int i;
            int i2 = 0;
            int size = this.ˋ.size();
            for (i = 0; i < size; i++) {
                ((s) this.ˋ.get(i)).ˎ();
            }
            size = this.ˊ.size();
            for (i = 0; i < size; i++) {
                ((s) this.ˊ.get(i)).ˎ();
            }
            if (this.ˎ != null) {
                i = this.ˎ.size();
                while (i2 < i) {
                    ((s) this.ˎ.get(i2)).ˎ();
                    i2++;
                }
            }
        }

        void ʼ() {
            int size = this.ˋ.size();
            for (int i = 0; i < size; i++) {
                LayoutParams layoutParams = (LayoutParams) ((s) this.ˋ.get(i)).ˊ.getLayoutParams();
                if (layoutParams != null) {
                    layoutParams.ˋ = true;
                }
            }
        }
    }

    class p implements Runnable {
        private boolean ʼ = false;
        private boolean ʽ = false;
        private int ˊ;
        private int ˋ;
        OverScroller ˎ;
        final /* synthetic */ RecyclerView ˏ;
        Interpolator ॱ = RecyclerView.ˏˎ;

        p(RecyclerView recyclerView) {
            this.ˏ = recyclerView;
            this.ˎ = new OverScroller(recyclerView.getContext(), RecyclerView.ˏˎ);
        }

        public void run() {
            if (this.ˏ.ˋॱ == null) {
                ˊ();
                return;
            }
            ˋ();
            this.ˏ.ᐝ();
            OverScroller overScroller = this.ˎ;
            q qVar = this.ˏ.ˋॱ.ʻॱ;
            if (overScroller.computeScrollOffset()) {
                int i;
                int i2;
                int i3;
                int i4;
                int ˏ;
                int[] iArr = this.ˏ.ˍ;
                int currX = overScroller.getCurrX();
                int currY = overScroller.getCurrY();
                int i5 = currX - this.ˊ;
                int i6 = currY - this.ˋ;
                this.ˊ = currX;
                this.ˋ = currY;
                if (this.ˏ.ˋ(i5, i6, iArr, null, 1)) {
                    i = i6 - iArr[1];
                    i2 = i5 - iArr[0];
                } else {
                    i = i6;
                    i2 = i5;
                }
                if (this.ˏ.ˊॱ != null) {
                    this.ˏ.ˏ(i2, i, this.ˏ.ˎˏ);
                    i5 = this.ˏ.ˎˏ[0];
                    i6 = this.ˏ.ˎˏ[1];
                    i3 = i2 - i5;
                    i4 = i - i6;
                    if (!(qVar == null || qVar.ॱॱ() || !qVar.ʽ())) {
                        ˏ = this.ˏ.ˋˊ.ˏ();
                        if (ˏ == 0) {
                            qVar.ᐝ();
                        } else if (qVar.ʼ() >= ˏ) {
                            qVar.ॱ(ˏ - 1);
                            qVar.ˋ(i2 - i3, i - i4);
                        } else {
                            qVar.ˋ(i2 - i3, i - i4);
                        }
                    }
                } else {
                    i4 = 0;
                    i3 = 0;
                    i6 = 0;
                    i5 = 0;
                }
                if (!this.ˏ.ॱˎ.isEmpty()) {
                    this.ˏ.invalidate();
                }
                if (this.ˏ.getOverScrollMode() != 2) {
                    this.ˏ.ˋ(i2, i);
                }
                if (!(this.ˏ.ˎ(i5, i6, i3, i4, null, 1) || (i3 == 0 && i4 == 0))) {
                    int i7;
                    int currVelocity = (int) overScroller.getCurrVelocity();
                    if (i3 != currX) {
                        ˏ = i3 < 0 ? -currVelocity : i3 > 0 ? currVelocity : 0;
                        i7 = ˏ;
                    } else {
                        i7 = 0;
                    }
                    if (i4 == currY) {
                        currVelocity = 0;
                    } else if (i4 < 0) {
                        currVelocity = -currVelocity;
                    } else if (i4 <= 0) {
                        currVelocity = 0;
                    }
                    if (this.ˏ.getOverScrollMode() != 2) {
                        this.ˏ.ˎ(i7, currVelocity);
                    }
                    if ((i7 != 0 || i3 == currX || overScroller.getFinalX() == 0) && (currVelocity != 0 || i4 == currY || overScroller.getFinalY() == 0)) {
                        overScroller.abortAnimation();
                    }
                }
                if (!(i5 == 0 && i6 == 0)) {
                    this.ˏ.ᐝ(i5, i6);
                }
                if (!this.ˏ.awakenScrollBars()) {
                    this.ˏ.invalidate();
                }
                Object obj = (i != 0 && this.ˏ.ˋॱ.ʼ() && i6 == i) ? 1 : null;
                Object obj2 = (i2 != 0 && this.ˏ.ˋॱ.ʻ() && i5 == i2) ? 1 : null;
                obj2 = (!(i2 == 0 && i == 0) && obj2 == null && obj == null) ? null : 1;
                if (overScroller.isFinished() || (obj2 == null && !this.ˏ.ʻ(1))) {
                    this.ˏ.ॱ(0);
                    if (RecyclerView.ॱ) {
                        this.ˏ.ˉ.ॱ();
                    }
                    this.ˏ.ˊ(1);
                } else {
                    ॱ();
                    if (this.ˏ.ˊˊ != null) {
                        this.ˏ.ˊˊ.ˎ(this.ˏ, i2, i);
                    }
                }
            }
            if (qVar != null) {
                if (qVar.ॱॱ()) {
                    qVar.ˋ(0, 0);
                }
                if (!this.ʽ) {
                    qVar.ᐝ();
                }
            }
            ˎ();
        }

        private void ˋ() {
            this.ʽ = false;
            this.ʼ = true;
        }

        private void ˎ() {
            this.ʼ = false;
            if (this.ʽ) {
                ॱ();
            }
        }

        void ॱ() {
            if (this.ʼ) {
                this.ʽ = true;
                return;
            }
            this.ˏ.removeCallbacks(this);
            ViewCompat.ˏ(this.ˏ, (Runnable) this);
        }

        public void ॱ(int i, int i2) {
            this.ˏ.ॱ(2);
            this.ˋ = 0;
            this.ˊ = 0;
            this.ˎ.fling(0, 0, i, i2, Integer.MIN_VALUE, ActivityChooserViewAdapter.MAX_ACTIVITY_COUNT_UNLIMITED, Integer.MIN_VALUE, ActivityChooserViewAdapter.MAX_ACTIVITY_COUNT_UNLIMITED);
            ॱ();
        }

        public void ˋ(int i, int i2) {
            ˎ(i, i2, 0, 0);
        }

        public void ˎ(int i, int i2, int i3, int i4) {
            ˊ(i, i2, ˊ(i, i2, i3, i4));
        }

        private float ˊ(float f) {
            return (float) Math.sin((double) ((f - 0.5f) * 0.47123894f));
        }

        private int ˊ(int i, int i2, int i3, int i4) {
            int round;
            int abs = Math.abs(i);
            int abs2 = Math.abs(i2);
            Object obj = abs > abs2 ? 1 : null;
            int sqrt = (int) Math.sqrt((double) ((i3 * i3) + (i4 * i4)));
            int sqrt2 = (int) Math.sqrt((double) ((i * i) + (i2 * i2)));
            int width = obj != null ? this.ˏ.getWidth() : this.ˏ.getHeight();
            int i5 = width / 2;
            float ˊ = (ˊ(Math.min(1.0f, (((float) sqrt2) * 1.0f) / ((float) width))) * ((float) i5)) + ((float) i5);
            if (sqrt > 0) {
                round = Math.round(1000.0f * Math.abs(ˊ / ((float) sqrt))) * 4;
            } else {
                if (obj != null) {
                    round = abs;
                } else {
                    round = abs2;
                }
                round = (int) (((((float) round) / ((float) width)) + 1.0f) * 300.0f);
            }
            return Math.min(round, 2000);
        }

        public void ˊ(int i, int i2, int i3) {
            ॱ(i, i2, i3, RecyclerView.ˏˎ);
        }

        public void ˎ(int i, int i2, Interpolator interpolator) {
            int ˊ = ˊ(i, i2, 0, 0);
            if (interpolator == null) {
                interpolator = RecyclerView.ˏˎ;
            }
            ॱ(i, i2, ˊ, interpolator);
        }

        public void ॱ(int i, int i2, int i3, Interpolator interpolator) {
            if (this.ॱ != interpolator) {
                this.ॱ = interpolator;
                this.ˎ = new OverScroller(this.ˏ.getContext(), interpolator);
            }
            this.ˏ.ॱ(2);
            this.ˋ = 0;
            this.ˊ = 0;
            this.ˎ.startScroll(0, 0, i, i2, i3);
            if (VERSION.SDK_INT < 23) {
                this.ˎ.computeScrollOffset();
            }
            ॱ();
        }

        public void ˊ() {
            this.ˏ.removeCallbacks(this);
            this.ˎ.abortAnimation();
        }
    }

    public static abstract class q {
        private final e ʼ = new e(0, 0);
        private View ʽ;
        private boolean ˊ;
        private int ˋ = -1;
        private RecyclerView ˎ;
        private boolean ˏ;
        private j ॱ;
        private boolean ᐝ;

        public interface c {
            @Nullable
            PointF ˎ(int i);
        }

        public static class e {
            private int ʻ;
            private int ˊ;
            private Interpolator ˋ;
            private int ˎ;
            private int ˏ;
            private int ॱ;
            private boolean ॱॱ;

            public e(@Px int i, @Px int i2) {
                this(i, i2, Integer.MIN_VALUE, null);
            }

            public e(@Px int i, @Px int i2, int i3, @Nullable Interpolator interpolator) {
                this.ˊ = -1;
                this.ॱॱ = false;
                this.ʻ = 0;
                this.ˎ = i;
                this.ॱ = i2;
                this.ˏ = i3;
                this.ˋ = interpolator;
            }

            public void ˏ(int i) {
                this.ˊ = i;
            }

            boolean ˊ() {
                return this.ˊ >= 0;
            }

            void ˊ(RecyclerView recyclerView) {
                if (this.ˊ >= 0) {
                    int i = this.ˊ;
                    this.ˊ = -1;
                    recyclerView.ˋ(i);
                    this.ॱॱ = false;
                } else if (this.ॱॱ) {
                    ˎ();
                    if (this.ˋ != null) {
                        recyclerView.ˊᐝ.ॱ(this.ˎ, this.ॱ, this.ˏ, this.ˋ);
                    } else if (this.ˏ == Integer.MIN_VALUE) {
                        recyclerView.ˊᐝ.ˋ(this.ˎ, this.ॱ);
                    } else {
                        recyclerView.ˊᐝ.ˊ(this.ˎ, this.ॱ, this.ˏ);
                    }
                    this.ʻ++;
                    if (this.ʻ > 10) {
                        Log.e("RecyclerView", "Smooth Scroll action is being updated too frequently. Make sure you are not changing it unless necessary");
                    }
                    this.ॱॱ = false;
                } else {
                    this.ʻ = 0;
                }
            }

            private void ˎ() {
                if (this.ˋ != null && this.ˏ < 1) {
                    throw new IllegalStateException("If you provide an interpolator, you must set a positive duration");
                } else if (this.ˏ < 1) {
                    throw new IllegalStateException("Scroll duration must be a positive number");
                }
            }

            public void ˏ(@Px int i, @Px int i2, int i3, @Nullable Interpolator interpolator) {
                this.ˎ = i;
                this.ॱ = i2;
                this.ˏ = i3;
                this.ˋ = interpolator;
                this.ॱॱ = true;
            }
        }

        protected abstract void ˊ();

        protected abstract void ˊ(@Px int i, @Px int i2, @NonNull t tVar, @NonNull e eVar);

        protected abstract void ˋ(@NonNull View view, @NonNull t tVar, @NonNull e eVar);

        protected abstract void ˎ();

        void ˎ(RecyclerView recyclerView, j jVar) {
            if (this.ᐝ) {
                Log.w("RecyclerView", "An instance of " + getClass().getSimpleName() + " was started " + "more than once. Each instance of" + getClass().getSimpleName() + HwAccountConstants.BLANK + "is intended to only be used once. You should create a new instance for " + "each use.");
            }
            this.ˎ = recyclerView;
            this.ॱ = jVar;
            if (this.ˋ == -1) {
                throw new IllegalArgumentException("Invalid target position");
            }
            this.ˎ.ˋˊ.ˊ = this.ˋ;
            this.ˊ = true;
            this.ˏ = true;
            this.ʽ = ˊ(ʼ());
            ˎ();
            this.ˎ.ˊᐝ.ॱ();
            this.ᐝ = true;
        }

        public void ॱ(int i) {
            this.ˋ = i;
        }

        @Nullable
        public PointF ˋ(int i) {
            j ˏ = ˏ();
            if (ˏ instanceof c) {
                return ((c) ˏ).ˎ(i);
            }
            Log.w("RecyclerView", "You should override computeScrollVectorForPosition when the LayoutManager does not implement " + c.class.getCanonicalName());
            return null;
        }

        @Nullable
        public j ˏ() {
            return this.ॱ;
        }

        protected final void ᐝ() {
            if (this.ˊ) {
                this.ˊ = false;
                ˊ();
                this.ˎ.ˋˊ.ˊ = -1;
                this.ʽ = null;
                this.ˋ = -1;
                this.ˏ = false;
                this.ॱ.ˏ(this);
                this.ॱ = null;
                this.ˎ = null;
            }
        }

        public boolean ॱॱ() {
            return this.ˏ;
        }

        public boolean ʽ() {
            return this.ˊ;
        }

        public int ʼ() {
            return this.ˋ;
        }

        void ˋ(int i, int i2) {
            RecyclerView recyclerView = this.ˎ;
            if (!this.ˊ || this.ˋ == -1 || recyclerView == null) {
                ᐝ();
            }
            if (this.ˏ && this.ʽ == null && this.ॱ != null) {
                PointF ˋ = ˋ(this.ˋ);
                if (!(ˋ == null || (ˋ.x == 0.0f && ˋ.y == 0.0f))) {
                    recyclerView.ˏ((int) Math.signum(ˋ.x), (int) Math.signum(ˋ.y), null);
                }
            }
            this.ˏ = false;
            if (this.ʽ != null) {
                if (ˎ(this.ʽ) == this.ˋ) {
                    ˋ(this.ʽ, recyclerView.ˋˊ, this.ʼ);
                    this.ʼ.ˊ(recyclerView);
                    ᐝ();
                } else {
                    Log.e("RecyclerView", "Passed over target position while smooth scrolling.");
                    this.ʽ = null;
                }
            }
            if (this.ˊ) {
                ˊ(i, i2, recyclerView.ˋˊ, this.ʼ);
                boolean ˊ = this.ʼ.ˊ();
                this.ʼ.ˊ(recyclerView);
                if (!ˊ) {
                    return;
                }
                if (this.ˊ) {
                    this.ˏ = true;
                    recyclerView.ˊᐝ.ॱ();
                    return;
                }
                ᐝ();
            }
        }

        public int ˎ(View view) {
            return this.ˎ.ॱॱ(view);
        }

        public int ʻ() {
            return this.ˎ.ˋॱ.ˈ();
        }

        public View ˊ(int i) {
            return this.ˎ.ˋॱ.ˋ(i);
        }

        protected void ॱ(View view) {
            if (ˎ(view) == ʼ()) {
                this.ʽ = view;
            }
        }

        protected void ˏ(@NonNull PointF pointF) {
            float sqrt = (float) Math.sqrt((double) ((pointF.x * pointF.x) + (pointF.y * pointF.y)));
            pointF.x /= sqrt;
            pointF.y /= sqrt;
        }
    }

    public static abstract class r {
        @Nullable
        public abstract View ॱ(@NonNull o oVar, int i, int i2);
    }

    public static abstract class s {
        private static final List<Object> ʻॱ = Collections.emptyList();
        int ʻ;
        int ʼ = -1;
        s ʽ = null;
        @NonNull
        public final View ˊ;
        List<Object> ˊॱ = null;
        int ˋ = -1;
        @VisibleForTesting
        int ˋॱ = -1;
        public int ˎ = -1;
        long ˏ = -1;
        boolean ˏॱ = false;
        o ͺ = null;
        public WeakReference<RecyclerView> ॱ;
        List<Object> ॱˊ = null;
        private int ॱˋ = 0;
        RecyclerView ॱˎ;
        int ॱॱ = -1;
        s ᐝ = null;
        private int ᐝॱ = 0;

        public s(@NonNull View view) {
            if (view == null) {
                throw new IllegalArgumentException("itemView may not be null");
            }
            this.ˊ = view;
        }

        void ˎ(int i, int i2, boolean z) {
            ˎ(8);
            ˎ(i2, z);
            this.ˎ = i;
        }

        void ˎ(int i, boolean z) {
            if (this.ˋ == -1) {
                this.ˋ = this.ˎ;
            }
            if (this.ʼ == -1) {
                this.ʼ = this.ˎ;
            }
            if (z) {
                this.ʼ += i;
            }
            this.ˎ += i;
            if (this.ˊ.getLayoutParams() != null) {
                ((LayoutParams) this.ˊ.getLayoutParams()).ˋ = true;
            }
        }

        void ˎ() {
            this.ˋ = -1;
            this.ʼ = -1;
        }

        void ˊ() {
            if (this.ˋ == -1) {
                this.ˋ = this.ˎ;
            }
        }

        public boolean G_() {
            return (this.ʻ & DnsConfig.MAX_CACHE_ENTRIES) != 0;
        }

        public final int ˏ() {
            return this.ʼ == -1 ? this.ˎ : this.ʼ;
        }

        public final int ˋ() {
            if (this.ॱˎ == null) {
                return -1;
            }
            return this.ॱˎ.ॱ(this);
        }

        public final int ᐝ() {
            return this.ˋ;
        }

        public final long ʽ() {
            return this.ˏ;
        }

        public final int ॱॱ() {
            return this.ॱॱ;
        }

        boolean ʼ() {
            return this.ͺ != null;
        }

        void ʻ() {
            this.ͺ.ॱ(this);
        }

        boolean ˋॱ() {
            return (this.ʻ & 32) != 0;
        }

        void ˏॱ() {
            this.ʻ &= -33;
        }

        void ˊॱ() {
            this.ʻ &= -257;
        }

        void ॱ(o oVar, boolean z) {
            this.ͺ = oVar;
            this.ˏॱ = z;
        }

        public boolean ॱˊ() {
            return (this.ʻ & 4) != 0;
        }

        boolean ͺ() {
            return (this.ʻ & 2) != 0;
        }

        public boolean ॱᐝ() {
            return (this.ʻ & 1) != 0;
        }

        public boolean ʻॱ() {
            return (this.ʻ & 8) != 0;
        }

        boolean ˊ(int i) {
            return (this.ʻ & i) != 0;
        }

        boolean ॱˋ() {
            return (this.ʻ & 256) != 0;
        }

        boolean ᐝॱ() {
            return (this.ʻ & WXMediaMessage.TITLE_LENGTH_LIMIT) != 0 || ॱˊ();
        }

        void ˊ(int i, int i2) {
            this.ʻ = (this.ʻ & (i2 ^ -1)) | (i & i2);
        }

        void ˎ(int i) {
            this.ʻ |= i;
        }

        void ˏ(Object obj) {
            if (obj == null) {
                ˎ(WXMediaMessage.DESCRIPTION_LENGTH_LIMIT);
            } else if ((this.ʻ & WXMediaMessage.DESCRIPTION_LENGTH_LIMIT) == 0) {
                ˉ();
                this.ॱˊ.add(obj);
            }
        }

        private void ˉ() {
            if (this.ॱˊ == null) {
                this.ॱˊ = new ArrayList();
                this.ˊॱ = Collections.unmodifiableList(this.ॱˊ);
            }
        }

        void ॱˎ() {
            if (this.ॱˊ != null) {
                this.ॱˊ.clear();
            }
            this.ʻ &= -1025;
        }

        List<Object> ʽॱ() {
            if ((this.ʻ & WXMediaMessage.DESCRIPTION_LENGTH_LIMIT) != 0) {
                return ʻॱ;
            }
            if (this.ॱˊ == null || this.ॱˊ.size() == 0) {
                return ʻॱ;
            }
            return this.ˊॱ;
        }

        void ʾ() {
            this.ʻ = 0;
            this.ˎ = -1;
            this.ˋ = -1;
            this.ˏ = -1;
            this.ʼ = -1;
            this.ᐝॱ = 0;
            this.ᐝ = null;
            this.ʽ = null;
            ॱˎ();
            this.ॱˋ = 0;
            this.ˋॱ = -1;
            RecyclerView.ˏ(this);
        }

        void ˊ(RecyclerView recyclerView) {
            if (this.ˋॱ != -1) {
                this.ॱˋ = this.ˋॱ;
            } else {
                this.ॱˋ = ViewCompat.getImportantForAccessibility(this.ˊ);
            }
            recyclerView.ॱ(this, 4);
        }

        void ॱ(RecyclerView recyclerView) {
            recyclerView.ॱ(this, this.ॱˋ);
            this.ॱˋ = 0;
        }

        public String toString() {
            StringBuilder stringBuilder = new StringBuilder("ViewHolder{" + Integer.toHexString(hashCode()) + " position=" + this.ˎ + " id=" + this.ˏ + ", oldPos=" + this.ˋ + ", pLpos:" + this.ʼ);
            if (ʼ()) {
                stringBuilder.append(" scrap ").append(this.ˏॱ ? "[changeScrap]" : "[attachedScrap]");
            }
            if (ॱˊ()) {
                stringBuilder.append(" invalid");
            }
            if (!ॱᐝ()) {
                stringBuilder.append(" unbound");
            }
            if (ͺ()) {
                stringBuilder.append(" update");
            }
            if (ʻॱ()) {
                stringBuilder.append(" removed");
            }
            if (G_()) {
                stringBuilder.append(" ignored");
            }
            if (ॱˋ()) {
                stringBuilder.append(" tmpDetached");
            }
            if (!ʿ()) {
                stringBuilder.append(" not recyclable(" + this.ᐝॱ + ")");
            }
            if (ᐝॱ()) {
                stringBuilder.append(" undefined adapter position");
            }
            if (this.ˊ.getParent() == null) {
                stringBuilder.append(" no parent");
            }
            stringBuilder.append("}");
            return stringBuilder.toString();
        }

        public final void ॱ(boolean z) {
            this.ᐝॱ = z ? this.ᐝॱ - 1 : this.ᐝॱ + 1;
            if (this.ᐝॱ < 0) {
                this.ᐝॱ = 0;
                Log.e("View", "isRecyclable decremented below 0: unmatched pair of setIsRecyable() calls for " + this);
            } else if (!z && this.ᐝॱ == 1) {
                this.ʻ |= 16;
            } else if (z && this.ᐝॱ == 0) {
                this.ʻ &= -17;
            }
        }

        public final boolean ʿ() {
            return (this.ʻ & 16) == 0 && !ViewCompat.ˋ(this.ˊ);
        }

        boolean ˈ() {
            return (this.ʻ & 16) != 0;
        }

        boolean ʼॱ() {
            return (this.ʻ & 16) == 0 && ViewCompat.ˋ(this.ˊ);
        }

        boolean ˊᐝ() {
            return (this.ʻ & 2) != 0;
        }
    }

    public static class t {
        boolean ʻ = false;
        private SparseArray<Object> ʻॱ;
        boolean ʼ = false;
        boolean ʽ = false;
        int ˊ = -1;
        boolean ˊॱ = false;
        int ˋ = 0;
        long ˋॱ;
        int ˎ = 0;
        int ˏ = 1;
        int ˏॱ;
        int ͺ;
        int ॱ = 0;
        int ॱˊ;
        int ॱˋ;
        boolean ॱॱ = false;
        boolean ᐝ = false;

        void ˏ(int i) {
            if ((this.ˏ & i) == 0) {
                throw new IllegalStateException("Layout state should be one of " + Integer.toBinaryString(i) + " but it is " + Integer.toBinaryString(this.ˏ));
            }
        }

        public void ˊ(a aVar) {
            this.ˏ = 1;
            this.ˋ = aVar.ˏ();
            this.ʼ = false;
            this.ᐝ = false;
            this.ʻ = false;
        }

        public boolean ˋ() {
            return this.ʼ;
        }

        public boolean ˎ() {
            return this.ˊॱ;
        }

        public int ˊ() {
            return this.ˊ;
        }

        public boolean ॱ() {
            return this.ˊ != -1;
        }

        public int ˏ() {
            return this.ʼ ? this.ˎ - this.ॱ : this.ˋ;
        }

        public String toString() {
            return "State{mTargetPosition=" + this.ˊ + ", mData=" + this.ʻॱ + ", mItemCount=" + this.ˋ + ", mIsMeasuring=" + this.ʻ + ", mPreviousLayoutItemCount=" + this.ˎ + ", mDeletedInvisibleItemCountSincePreviousLayout=" + this.ॱ + ", mStructureChanged=" + this.ॱॱ + ", mInPreLayout=" + this.ʼ + ", mRunSimpleAnimations=" + this.ʽ + ", mRunPredictiveAnimations=" + this.ˊॱ + '}';
        }
    }

    static {
        boolean z = VERSION.SDK_INT == 18 || VERSION.SDK_INT == 19 || VERSION.SDK_INT == 20;
        ˏ = z;
        if (VERSION.SDK_INT >= 23) {
            z = true;
        } else {
            z = false;
        }
        ˊ = z;
        if (VERSION.SDK_INT >= 16) {
            z = true;
        } else {
            z = false;
        }
        ˎ = z;
        if (VERSION.SDK_INT >= 21) {
            z = true;
        } else {
            z = false;
        }
        ॱ = z;
        if (VERSION.SDK_INT <= 15) {
            z = true;
        } else {
            z = false;
        }
        ـ = z;
        if (VERSION.SDK_INT <= 15) {
            z = true;
        } else {
            z = false;
        }
        ॱͺ = z;
    }

    public RecyclerView(@NonNull Context context) {
        this(context, null);
    }

    public RecyclerView(@NonNull Context context, @Nullable AttributeSet attributeSet) {
        this(context, attributeSet, 0);
    }

    public RecyclerView(@NonNull Context context, @Nullable AttributeSet attributeSet, int i) {
        boolean z = true;
        super(context, attributeSet, i);
        this.ॱʼ = new k(this);
        this.ˋ = new o(this);
        this.ᐝ = new ms();
        this.ʽ = new 1(this);
        this.ˏॱ = new Rect();
        this.ᐝˊ = new Rect();
        this.ॱˊ = new RectF();
        this.ॱˎ = new ArrayList();
        this.ᐝˋ = new ArrayList();
        this.ᐧ = 0;
        this.ʼॱ = false;
        this.ʾ = false;
        this.ᶥ = 0;
        this.ꜞ = 0;
        this.ﾞ = new EdgeEffectFactory();
        this.ˊˋ = new me();
        this.ʼˊ = 0;
        this.ʻˋ = -1;
        this.ˉॱ = Float.MIN_VALUE;
        this.ʿॱ = Float.MIN_VALUE;
        this.ˊʼ = true;
        this.ˊᐝ = new p(this);
        this.ˉ = ॱ ? new o.md.b() : null;
        this.ˋˊ = new t();
        this.ˋᐝ = false;
        this.ˋˋ = false;
        this.ˋʻ = new d(this);
        this.ˌ = false;
        this.ˋʼ = new int[2];
        this.ͺˏ = new int[2];
        this.ˍ = new int[2];
        this.ˏͺ = new int[2];
        this.ˎˏ = new int[2];
        this.ˑ = new ArrayList();
        this.ˎͺ = new 4(this);
        this.ˑॱ = new 3(this);
        if (attributeSet != null) {
            TypedArray obtainStyledAttributes = context.obtainStyledAttributes(attributeSet, ˏˏ, i, 0);
            this.ʻ = obtainStyledAttributes.getBoolean(0, true);
            obtainStyledAttributes.recycle();
        } else {
            this.ʻ = true;
        }
        setScrollContainer(true);
        setFocusableInTouchMode(true);
        ViewConfiguration viewConfiguration = ViewConfiguration.get(context);
        this.ʼᐝ = viewConfiguration.getScaledTouchSlop();
        this.ˉॱ = ia.ॱ(viewConfiguration, context);
        this.ʿॱ = ia.ˎ(viewConfiguration, context);
        this.ʽˋ = viewConfiguration.getScaledMinimumFlingVelocity();
        this.ˈॱ = viewConfiguration.getScaledMaximumFlingVelocity();
        setWillNotDraw(getOverScrollMode() == 2);
        this.ˊˋ.ˎ(this.ˋʻ);
        ॱ();
        ˌ();
        ˋᐝ();
        if (ViewCompat.getImportantForAccessibility(this) == 0) {
            ViewCompat.setImportantForAccessibility((View) this, 1);
        }
        this.ꓸ = (AccessibilityManager) getContext().getSystemService("accessibility");
        setAccessibilityDelegateCompat(new mp(this));
        if (attributeSet != null) {
            TypedArray obtainStyledAttributes2 = context.obtainStyledAttributes(attributeSet, o.ly.e.ʼ, i, 0);
            String string = obtainStyledAttributes2.getString(o.ly.e.ˊॱ);
            if (obtainStyledAttributes2.getInt(o.ly.e.ʽ, -1) == -1) {
                setDescendantFocusability(262144);
            }
            this.ᐝॱ = obtainStyledAttributes2.getBoolean(o.ly.e.ˋॱ, false);
            if (this.ᐝॱ) {
                ˏ((StateListDrawable) obtainStyledAttributes2.getDrawable(o.ly.e.ॱᐝ), obtainStyledAttributes2.getDrawable(o.ly.e.ʻॱ), (StateListDrawable) obtainStyledAttributes2.getDrawable(o.ly.e.ᐝॱ), obtainStyledAttributes2.getDrawable(o.ly.e.ॱˎ));
            }
            obtainStyledAttributes2.recycle();
            ॱ(context, string, attributeSet, i, 0);
            if (VERSION.SDK_INT >= 21) {
                obtainStyledAttributes = context.obtainStyledAttributes(attributeSet, ͺॱ, i, 0);
                z = obtainStyledAttributes.getBoolean(0, true);
                obtainStyledAttributes.recycle();
            }
        } else {
            setDescendantFocusability(262144);
        }
        setNestedScrollingEnabled(z);
    }

    String ˎ() {
        return HwAccountConstants.BLANK + super.toString() + ", adapter:" + this.ˊॱ + ", layout:" + this.ˋॱ + ", context:" + getContext();
    }

    @SuppressLint({"InlinedApi"})
    private void ˋᐝ() {
        if (ViewCompat.ˏ(this) == 0) {
            ViewCompat.ˊ((View) this, 8);
        }
    }

    public void setAccessibilityDelegateCompat(@Nullable mp mpVar) {
        this.ˎˎ = mpVar;
        ViewCompat.ˏ((View) this, this.ˎˎ);
    }

    private void ॱ(Context context, String str, AttributeSet attributeSet, int i, int i2) {
        if (str != null) {
            String trim = str.trim();
            if (!trim.isEmpty()) {
                String ˊ = ˊ(context, trim);
                try {
                    ClassLoader classLoader;
                    Object[] objArr;
                    Constructor constructor;
                    if (isInEditMode()) {
                        classLoader = getClass().getClassLoader();
                    } else {
                        classLoader = context.getClassLoader();
                    }
                    Class asSubclass = classLoader.loadClass(ˊ).asSubclass(j.class);
                    try {
                        objArr = new Object[]{context, attributeSet, Integer.valueOf(i), Integer.valueOf(i2)};
                        constructor = asSubclass.getConstructor(ॱʻ);
                    } catch (Throwable e) {
                        constructor = asSubclass.getConstructor(new Class[0]);
                        objArr = null;
                    }
                    constructor.setAccessible(true);
                    setLayoutManager((j) constructor.newInstance(objArr));
                } catch (Throwable e2) {
                    e2.initCause(e);
                    throw new IllegalStateException(attributeSet.getPositionDescription() + ": Error creating LayoutManager " + ˊ, e2);
                } catch (Throwable e3) {
                    throw new IllegalStateException(attributeSet.getPositionDescription() + ": Unable to find LayoutManager " + ˊ, e3);
                } catch (Throwable e32) {
                    throw new IllegalStateException(attributeSet.getPositionDescription() + ": Could not instantiate the LayoutManager: " + ˊ, e32);
                } catch (Throwable e322) {
                    throw new IllegalStateException(attributeSet.getPositionDescription() + ": Could not instantiate the LayoutManager: " + ˊ, e322);
                } catch (Throwable e3222) {
                    throw new IllegalStateException(attributeSet.getPositionDescription() + ": Cannot access non-public constructor " + ˊ, e3222);
                } catch (Throwable e32222) {
                    throw new IllegalStateException(attributeSet.getPositionDescription() + ": Class is not a LayoutManager " + ˊ, e32222);
                }
            }
        }
    }

    private String ˊ(Context context, String str) {
        if (str.charAt(0) == '.') {
            return context.getPackageName() + str;
        }
        return !str.contains(".") ? RecyclerView.class.getPackage().getName() + '.' + str : str;
    }

    private void ˌ() {
        this.ʼ = new mg(new 2(this));
    }

    void ॱ() {
        this.ॱॱ = new mc(new 9(this));
    }

    public void setHasFixedSize(boolean z) {
        this.ॱˋ = z;
    }

    public void setClipToPadding(boolean z) {
        if (z != this.ʻ) {
            ॱˎ();
        }
        this.ʻ = z;
        super.setClipToPadding(z);
        if (this.ʻॱ) {
            requestLayout();
        }
    }

    public boolean getClipToPadding() {
        return this.ʻ;
    }

    public void setScrollingTouchSlop(int i) {
        ViewConfiguration viewConfiguration = ViewConfiguration.get(getContext());
        switch (i) {
            case 0:
                break;
            case 1:
                this.ʼᐝ = viewConfiguration.getScaledPagingTouchSlop();
                return;
            default:
                Log.w("RecyclerView", "setScrollingTouchSlop(): bad argument constant " + i + "; using default value");
                break;
        }
        this.ʼᐝ = viewConfiguration.getScaledTouchSlop();
    }

    public void setAdapter(@Nullable a aVar) {
        setLayoutFrozen(false);
        ˎ(aVar, false, true);
        ˊ(false);
        requestLayout();
    }

    public void ˏ() {
        if (this.ˊˋ != null) {
            this.ˊˋ.ˏ();
        }
        if (this.ˋॱ != null) {
            this.ˋॱ.ˏ(this.ˋ);
            this.ˋॱ.ˋ(this.ˋ);
        }
        this.ˋ.ˋ();
    }

    private void ˎ(@Nullable a aVar, boolean z, boolean z2) {
        if (this.ˊॱ != null) {
            this.ˊॱ.ˊ(this.ॱʼ);
            this.ˊॱ.ॱ(this);
        }
        if (!z || z2) {
            ˏ();
        }
        this.ॱॱ.ˊ();
        a aVar2 = this.ˊॱ;
        this.ˊॱ = aVar;
        if (aVar != null) {
            aVar.ˋ(this.ॱʼ);
            aVar.ˋ(this);
        }
        if (this.ˋॱ != null) {
            this.ˋॱ.ॱ(aVar2, this.ˊॱ);
        }
        this.ˋ.ˋ(aVar2, this.ˊॱ, z);
        this.ˋˊ.ॱॱ = true;
    }

    @Nullable
    public a ˋ() {
        return this.ˊॱ;
    }

    public void setRecyclerListener(@Nullable l lVar) {
        this.ͺ = lVar;
    }

    public int getBaseline() {
        if (this.ˋॱ != null) {
            return this.ˋॱ.ʼॱ();
        }
        return super.getBaseline();
    }

    public void ˏ(@NonNull h hVar) {
        if (this.ꜟ == null) {
            this.ꜟ = new ArrayList();
        }
        this.ꜟ.add(hVar);
    }

    public void ˎ(@NonNull h hVar) {
        if (this.ꜟ != null) {
            this.ꜟ.remove(hVar);
        }
    }

    public void setLayoutManager(@Nullable j jVar) {
        if (jVar != this.ˋॱ) {
            ॱॱ();
            if (this.ˋॱ != null) {
                if (this.ˊˋ != null) {
                    this.ˊˋ.ˏ();
                }
                this.ˋॱ.ˏ(this.ˋ);
                this.ˋॱ.ˋ(this.ˋ);
                this.ˋ.ˋ();
                if (this.ॱᐝ) {
                    this.ˋॱ.ॱ(this, this.ˋ);
                }
                this.ˋॱ.ॱ(null);
                this.ˋॱ = null;
            } else {
                this.ˋ.ˋ();
            }
            this.ʼ.ॱ();
            this.ˋॱ = jVar;
            if (jVar != null) {
                if (jVar.ॱˎ != null) {
                    throw new IllegalArgumentException("LayoutManager " + jVar + " is already attached to a RecyclerView:" + jVar.ॱˎ.ˎ());
                }
                this.ˋॱ.ॱ(this);
                if (this.ॱᐝ) {
                    this.ˋॱ.ˊ(this);
                }
            }
            this.ˋ.ˊ();
            requestLayout();
        }
    }

    public void setOnFlingListener(@Nullable i iVar) {
        this.ʽˊ = iVar;
    }

    @Nullable
    public i ˊ() {
        return this.ʽˊ;
    }

    protected Parcelable onSaveInstanceState() {
        SavedState savedState = new SavedState(super.onSaveInstanceState());
        if (this.ॱʽ != null) {
            savedState.ॱ(this.ॱʽ);
        } else if (this.ˋॱ != null) {
            savedState.ˋ = this.ˋॱ.ˊ();
        } else {
            savedState.ˋ = null;
        }
        return savedState;
    }

    protected void onRestoreInstanceState(Parcelable parcelable) {
        if (parcelable instanceof SavedState) {
            this.ॱʽ = (SavedState) parcelable;
            super.onRestoreInstanceState(this.ॱʽ.ˊ());
            if (this.ˋॱ != null && this.ॱʽ.ˋ != null) {
                this.ˋॱ.ॱ(this.ॱʽ.ˋ);
                return;
            }
            return;
        }
        super.onRestoreInstanceState(parcelable);
    }

    protected void dispatchSaveInstanceState(SparseArray<Parcelable> sparseArray) {
        dispatchFreezeSelfOnly(sparseArray);
    }

    protected void dispatchRestoreInstanceState(SparseArray<Parcelable> sparseArray) {
        dispatchThawSelfOnly(sparseArray);
    }

    private void ˊ(s sVar) {
        View view = sVar.ˊ;
        boolean z = view.getParent() == this;
        this.ˋ.ॱ(ॱ(view));
        if (sVar.ॱˋ()) {
            this.ʼ.ॱ(view, -1, view.getLayoutParams(), true);
        } else if (z) {
            this.ʼ.ˎ(view);
        } else {
            this.ʼ.ˋ(view, true);
        }
    }

    boolean ˎ(View view) {
        ʼ();
        boolean ʻ = this.ʼ.ʻ(view);
        if (ʻ) {
            s ˏ = ˏ(view);
            this.ˋ.ॱ(ˏ);
            this.ˋ.ˊ(ˏ);
        }
        ˎ(!ʻ);
        return ʻ;
    }

    @Nullable
    public j ʻ() {
        return this.ˋॱ;
    }

    public void setRecycledViewPool(@Nullable m mVar) {
        this.ˋ.ˋ(mVar);
    }

    public void setViewCacheExtension(@Nullable r rVar) {
        this.ˋ.ˋ(rVar);
    }

    public void setItemViewCacheSize(int i) {
        this.ˋ.ॱ(i);
    }

    public int ʽ() {
        return this.ʼˊ;
    }

    void ॱ(int i) {
        if (i != this.ʼˊ) {
            this.ʼˊ = i;
            if (i != 2) {
                ˋˋ();
            }
            ᐝ(i);
        }
    }

    public void ˋ(@NonNull f fVar, int i) {
        if (this.ˋॱ != null) {
            this.ˋॱ.ˎ("Cannot add item decoration during a scroll  or layout");
        }
        if (this.ॱˎ.isEmpty()) {
            setWillNotDraw(false);
        }
        if (i < 0) {
            this.ॱˎ.add(fVar);
        } else {
            this.ॱˎ.add(i, fVar);
        }
        ʽॱ();
        requestLayout();
    }

    public void ॱ(@NonNull f fVar) {
        ˋ(fVar, -1);
    }

    public void ˏ(@NonNull f fVar) {
        if (this.ˋॱ != null) {
            this.ˋॱ.ˎ("Cannot remove item decoration during a scroll  or layout");
        }
        this.ॱˎ.remove(fVar);
        if (this.ॱˎ.isEmpty()) {
            setWillNotDraw(getOverScrollMode() == 2);
        }
        ʽॱ();
        requestLayout();
    }

    public void setChildDrawingOrderCallback(@Nullable e eVar) {
        if (eVar != this.ˊʽ) {
            this.ˊʽ = eVar;
            setChildrenDrawingOrderEnabled(this.ˊʽ != null);
        }
    }

    @Deprecated
    public void setOnScrollListener(@Nullable n nVar) {
        this.ˊʻ = nVar;
    }

    public void ॱ(@NonNull n nVar) {
        if (this.ˋʽ == null) {
            this.ˋʽ = new ArrayList();
        }
        this.ˋʽ.add(nVar);
    }

    public void ˏ(@NonNull n nVar) {
        if (this.ˋʽ != null) {
            this.ˋʽ.remove(nVar);
        }
    }

    public void ˏ(int i) {
        if (!this.ʽॱ) {
            ॱॱ();
            if (this.ˋॱ == null) {
                Log.e("RecyclerView", "Cannot scroll to position a LayoutManager set. Call setLayoutManager with a non-null argument.");
                return;
            }
            this.ˋॱ.ˏ(i);
            awakenScrollBars();
        }
    }

    void ˋ(int i) {
        if (this.ˋॱ != null) {
            this.ˋॱ.ˏ(i);
            awakenScrollBars();
        }
    }

    public void scrollTo(int i, int i2) {
        Log.w("RecyclerView", "RecyclerView does not support scrolling to an absolute position. Use scrollToPosition instead");
    }

    public void scrollBy(int i, int i2) {
        if (this.ˋॱ == null) {
            Log.e("RecyclerView", "Cannot scroll without a LayoutManager set. Call setLayoutManager with a non-null argument.");
        } else if (!this.ʽॱ) {
            boolean ʻ = this.ˋॱ.ʻ();
            boolean ʼ = this.ˋॱ.ʼ();
            if (ʻ || ʼ) {
                if (!ʻ) {
                    i = 0;
                }
                if (!ʼ) {
                    i2 = 0;
                }
                ˋ(i, i2, null);
            }
        }
    }

    void ˏ(int i, int i2, @Nullable int[] iArr) {
        int ˎ;
        ʼ();
        ॱˋ();
        gp.ˏ("RV Scroll");
        ॱ(this.ˋˊ);
        if (i != 0) {
            int ˊ = this.ˋॱ.ˊ(i, this.ˋ, this.ˋˊ);
        } else {
            boolean z = false;
        }
        if (i2 != 0) {
            ˎ = this.ˋॱ.ˎ(i2, this.ˋ, this.ˋˊ);
        } else {
            ˎ = 0;
        }
        gp.ˊ();
        ˊˋ();
        ॱᐝ();
        ˎ(false);
        if (iArr != null) {
            iArr[0] = ˊ;
            iArr[1] = ˎ;
        }
    }

    void ᐝ() {
        if (!this.ʻॱ || this.ʼॱ) {
            gp.ˏ("RV FullInvalidate");
            ˈ();
            gp.ˊ();
        } else if (!this.ॱॱ.ˎ()) {
        } else {
            if (this.ॱॱ.ˏ(4) && !this.ॱॱ.ˏ(11)) {
                gp.ˏ("RV PartialInvalidate");
                ʼ();
                ॱˋ();
                this.ॱॱ.ˋ();
                if (!this.ˈ) {
                    if (ˎˎ()) {
                        ˈ();
                    } else {
                        this.ॱॱ.ˏ();
                    }
                }
                ˎ(true);
                ॱᐝ();
                gp.ˊ();
            } else if (this.ॱॱ.ˎ()) {
                gp.ˏ("RV FullInvalidate");
                ˈ();
                gp.ˊ();
            }
        }
    }

    private boolean ˎˎ() {
        int ˊ = this.ʼ.ˊ();
        for (int i = 0; i < ˊ; i++) {
            s ˏ = ˏ(this.ʼ.ˎ(i));
            if (ˏ != null && !ˏ.G_() && ˏ.ˊᐝ()) {
                return true;
            }
        }
        return false;
    }

    boolean ˋ(int i, int i2, MotionEvent motionEvent) {
        int i3;
        int i4;
        int i5;
        int i6;
        ᐝ();
        if (this.ˊॱ != null) {
            ˏ(i, i2, this.ˎˏ);
            i3 = this.ˎˏ[0];
            i4 = this.ˎˏ[1];
            i5 = i - i3;
            i6 = i2 - i4;
        } else {
            i4 = 0;
            i3 = 0;
            i6 = 0;
            i5 = 0;
        }
        if (!this.ॱˎ.isEmpty()) {
            invalidate();
        }
        if (ˎ(i3, i4, i5, i6, this.ͺˏ, 0)) {
            this.ʽᐝ -= this.ͺˏ[0];
            this.ʾॱ -= this.ͺˏ[1];
            if (motionEvent != null) {
                motionEvent.offsetLocation((float) this.ͺˏ[0], (float) this.ͺˏ[1]);
            }
            int[] iArr = this.ˏͺ;
            iArr[0] = iArr[0] + this.ͺˏ[0];
            iArr = this.ˏͺ;
            iArr[1] = iArr[1] + this.ͺˏ[1];
        } else if (getOverScrollMode() != 2) {
            if (!(motionEvent == null || hp.ˏ(motionEvent, 8194))) {
                ˎ(motionEvent.getX(), (float) i5, motionEvent.getY(), (float) i6);
            }
            ˋ(i, i2);
        }
        if (!(i3 == 0 && i4 == 0)) {
            ᐝ(i3, i4);
        }
        if (!awakenScrollBars()) {
            invalidate();
        }
        if (i3 == 0 && i4 == 0) {
            return false;
        }
        return true;
    }

    public int computeHorizontalScrollOffset() {
        if (this.ˋॱ != null && this.ˋॱ.ʻ()) {
            return this.ˋॱ.ॱ(this.ˋˊ);
        }
        return 0;
    }

    public int computeHorizontalScrollExtent() {
        if (this.ˋॱ != null && this.ˋॱ.ʻ()) {
            return this.ˋॱ.ˎ(this.ˋˊ);
        }
        return 0;
    }

    public int computeHorizontalScrollRange() {
        if (this.ˋॱ != null && this.ˋॱ.ʻ()) {
            return this.ˋॱ.ʼ(this.ˋˊ);
        }
        return 0;
    }

    public int computeVerticalScrollOffset() {
        if (this.ˋॱ != null && this.ˋॱ.ʼ()) {
            return this.ˋॱ.ˊ(this.ˋˊ);
        }
        return 0;
    }

    public int computeVerticalScrollExtent() {
        if (this.ˋॱ != null && this.ˋॱ.ʼ()) {
            return this.ˋॱ.ʽ(this.ˋˊ);
        }
        return 0;
    }

    public int computeVerticalScrollRange() {
        if (this.ˋॱ != null && this.ˋॱ.ʼ()) {
            return this.ˋॱ.ʻ(this.ˋˊ);
        }
        return 0;
    }

    void ʼ() {
        this.ᐧ++;
        if (this.ᐧ == 1 && !this.ʽॱ) {
            this.ˈ = false;
        }
    }

    void ˎ(boolean z) {
        if (this.ᐧ < 1) {
            this.ᐧ = 1;
        }
        if (!(z || this.ʽॱ)) {
            this.ˈ = false;
        }
        if (this.ᐧ == 1) {
            if (!(!z || !this.ˈ || this.ʽॱ || this.ˋॱ == null || this.ˊॱ == null)) {
                ˈ();
            }
            if (!this.ʽॱ) {
                this.ˈ = false;
            }
        }
        this.ᐧ--;
    }

    public void setLayoutFrozen(boolean z) {
        if (z != this.ʽॱ) {
            ˊ("Do not setLayoutFrozen in layout or scroll");
            if (z) {
                long uptimeMillis = SystemClock.uptimeMillis();
                onTouchEvent(MotionEvent.obtain(uptimeMillis, uptimeMillis, 3, 0.0f, 0.0f, 0));
                this.ʽॱ = true;
                this.ᐝᐝ = true;
                ॱॱ();
                return;
            }
            this.ʽॱ = false;
            if (!(!this.ˈ || this.ˋॱ == null || this.ˊॱ == null)) {
                requestLayout();
            }
            this.ˈ = false;
        }
    }

    public void ˊ(@Px int i, @Px int i2) {
        ˊ(i, i2, null);
    }

    public void ˊ(@Px int i, @Px int i2, @Nullable Interpolator interpolator) {
        int i3 = 0;
        if (this.ˋॱ == null) {
            Log.e("RecyclerView", "Cannot smooth scroll without a LayoutManager set. Call setLayoutManager with a non-null argument.");
        } else if (!this.ʽॱ) {
            if (!this.ˋॱ.ʻ()) {
                i = 0;
            }
            if (this.ˋॱ.ʼ()) {
                i3 = i2;
            }
            if (i != 0 || i3 != 0) {
                this.ˊᐝ.ˎ(i, i3, interpolator);
            }
        }
    }

    public boolean ॱ(int i, int i2) {
        if (this.ˋॱ == null) {
            Log.e("RecyclerView", "Cannot fling without a LayoutManager set. Call setLayoutManager with a non-null argument.");
            return false;
        } else if (this.ʽॱ) {
            return false;
        } else {
            boolean ʻ = this.ˋॱ.ʻ();
            boolean ʼ = this.ˋॱ.ʼ();
            if (!ʻ || Math.abs(i) < this.ʽˋ) {
                i = 0;
            }
            if (!ʼ || Math.abs(i2) < this.ʽˋ) {
                i2 = 0;
            }
            if ((i == 0 && i2 == 0) || dispatchNestedPreFling((float) i, (float) i2)) {
                return false;
            }
            boolean z;
            if (ʻ || ʼ) {
                z = true;
            } else {
                z = false;
            }
            dispatchNestedFling((float) i, (float) i2, z);
            if (this.ʽˊ != null && this.ʽˊ.ˎ(i, i2)) {
                return true;
            }
            if (!z) {
                return false;
            }
            int i3;
            if (ʻ) {
                i3 = 1;
            } else {
                i3 = 0;
            }
            if (ʼ) {
                i3 |= 2;
            }
            ॱॱ(i3, 1);
            this.ˊᐝ.ॱ(Math.max(-this.ˈॱ, Math.min(i, this.ˈॱ)), Math.max(-this.ˈॱ, Math.min(i2, this.ˈॱ)));
            return true;
        }
    }

    public void ॱॱ() {
        ॱ(0);
        ˋˋ();
    }

    private void ˋˋ() {
        this.ˊᐝ.ˊ();
        if (this.ˋॱ != null) {
            this.ˋॱ.ˎˏ();
        }
    }

    public int ˋॱ() {
        return this.ʽˋ;
    }

    private void ˎ(float f, float f2, float f3, float f4) {
        Object obj = 1;
        Object obj2 = null;
        if (f2 < 0.0f) {
            ˊॱ();
            it.ॱ(this.ꞌ, (-f2) / ((float) getWidth()), 1.0f - (f3 / ((float) getHeight())));
            obj2 = 1;
        } else if (f2 > 0.0f) {
            ˏॱ();
            it.ॱ(this.ﹳ, f2 / ((float) getWidth()), f3 / ((float) getHeight()));
            int i = 1;
        }
        if (f4 < 0.0f) {
            ॱˊ();
            it.ॱ(this.ʹ, (-f4) / ((float) getHeight()), f / ((float) getWidth()));
        } else if (f4 > 0.0f) {
            ͺ();
            it.ॱ(this.ﾟ, f4 / ((float) getHeight()), 1.0f - (f / ((float) getWidth())));
        } else {
            obj = obj2;
        }
        if (obj != null || f2 != 0.0f || f4 != 0.0f) {
            ViewCompat.ˎ(this);
        }
    }

    private void ˑ() {
        int i = 0;
        if (this.ꞌ != null) {
            this.ꞌ.onRelease();
            i = this.ꞌ.isFinished();
        }
        if (this.ʹ != null) {
            this.ʹ.onRelease();
            i |= this.ʹ.isFinished();
        }
        if (this.ﹳ != null) {
            this.ﹳ.onRelease();
            i |= this.ﹳ.isFinished();
        }
        if (this.ﾟ != null) {
            this.ﾟ.onRelease();
            i |= this.ﾟ.isFinished();
        }
        if (i != 0) {
            ViewCompat.ˎ(this);
        }
    }

    void ˋ(int i, int i2) {
        int i3 = 0;
        if (!(this.ꞌ == null || this.ꞌ.isFinished() || i <= 0)) {
            this.ꞌ.onRelease();
            i3 = this.ꞌ.isFinished();
        }
        if (!(this.ﹳ == null || this.ﹳ.isFinished() || i >= 0)) {
            this.ﹳ.onRelease();
            i3 |= this.ﹳ.isFinished();
        }
        if (!(this.ʹ == null || this.ʹ.isFinished() || i2 <= 0)) {
            this.ʹ.onRelease();
            i3 |= this.ʹ.isFinished();
        }
        if (!(this.ﾟ == null || this.ﾟ.isFinished() || i2 >= 0)) {
            this.ﾟ.onRelease();
            i3 |= this.ﾟ.isFinished();
        }
        if (i3 != 0) {
            ViewCompat.ˎ(this);
        }
    }

    void ˎ(int i, int i2) {
        if (i < 0) {
            ˊॱ();
            this.ꞌ.onAbsorb(-i);
        } else if (i > 0) {
            ˏॱ();
            this.ﹳ.onAbsorb(i);
        }
        if (i2 < 0) {
            ॱˊ();
            this.ʹ.onAbsorb(-i2);
        } else if (i2 > 0) {
            ͺ();
            this.ﾟ.onAbsorb(i2);
        }
        if (i != 0 || i2 != 0) {
            ViewCompat.ˎ(this);
        }
    }

    void ˊॱ() {
        if (this.ꞌ == null) {
            this.ꞌ = this.ﾞ.ˏ(this, 0);
            if (this.ʻ) {
                this.ꞌ.setSize((getMeasuredHeight() - getPaddingTop()) - getPaddingBottom(), (getMeasuredWidth() - getPaddingLeft()) - getPaddingRight());
            } else {
                this.ꞌ.setSize(getMeasuredHeight(), getMeasuredWidth());
            }
        }
    }

    void ˏॱ() {
        if (this.ﹳ == null) {
            this.ﹳ = this.ﾞ.ˏ(this, 2);
            if (this.ʻ) {
                this.ﹳ.setSize((getMeasuredHeight() - getPaddingTop()) - getPaddingBottom(), (getMeasuredWidth() - getPaddingLeft()) - getPaddingRight());
            } else {
                this.ﹳ.setSize(getMeasuredHeight(), getMeasuredWidth());
            }
        }
    }

    void ॱˊ() {
        if (this.ʹ == null) {
            this.ʹ = this.ﾞ.ˏ(this, 1);
            if (this.ʻ) {
                this.ʹ.setSize((getMeasuredWidth() - getPaddingLeft()) - getPaddingRight(), (getMeasuredHeight() - getPaddingTop()) - getPaddingBottom());
            } else {
                this.ʹ.setSize(getMeasuredWidth(), getMeasuredHeight());
            }
        }
    }

    void ͺ() {
        if (this.ﾟ == null) {
            this.ﾟ = this.ﾞ.ˏ(this, 3);
            if (this.ʻ) {
                this.ﾟ.setSize((getMeasuredWidth() - getPaddingLeft()) - getPaddingRight(), (getMeasuredHeight() - getPaddingTop()) - getPaddingBottom());
            } else {
                this.ﾟ.setSize(getMeasuredWidth(), getMeasuredHeight());
            }
        }
    }

    void ॱˎ() {
        this.ﾟ = null;
        this.ʹ = null;
        this.ﹳ = null;
        this.ꞌ = null;
    }

    public void setEdgeEffectFactory(@NonNull EdgeEffectFactory edgeEffectFactory) {
        hf.ˊ(edgeEffectFactory);
        this.ﾞ = edgeEffectFactory;
        ॱˎ();
    }

    public View focusSearch(View view, int i) {
        boolean z = true;
        View ॱ = this.ˋॱ.ॱ(view, i);
        if (ॱ != null) {
            return ॱ;
        }
        boolean z2 = (this.ˊॱ == null || this.ˋॱ == null || ᐝॱ() || this.ʽॱ) ? false : true;
        FocusFinder instance = FocusFinder.getInstance();
        if (z2 && (i == 2 || i == 1)) {
            int i2;
            if (this.ˋॱ.ʼ()) {
                boolean z3;
                i2 = i == 2 ? 130 : 33;
                if (instance.findNextFocus(this, view, i2) == null) {
                    z3 = true;
                } else {
                    z3 = false;
                }
                if (ـ) {
                    i = i2;
                    z2 = z3;
                } else {
                    z2 = z3;
                }
            } else {
                z2 = false;
            }
            if (z2 || !this.ˋॱ.ʻ()) {
                z = z2;
            } else {
                int i3;
                if (this.ˋॱ.ʽॱ() == 1) {
                    i3 = 1;
                } else {
                    i3 = 0;
                }
                if (i == 2) {
                    i2 = 1;
                } else {
                    i2 = 0;
                }
                i2 = (i2 ^ i3) != 0 ? 66 : 17;
                if (instance.findNextFocus(this, view, i2) != null) {
                    z = false;
                }
                if (ـ) {
                    i = i2;
                }
            }
            if (z) {
                ᐝ();
                if (ˊ(view) == null) {
                    return null;
                }
                ʼ();
                this.ˋॱ.ˎ(view, i, this.ˋ, this.ˋˊ);
                ˎ(false);
            }
            ॱ = instance.findNextFocus(this, view, i);
        } else {
            View findNextFocus = instance.findNextFocus(this, view, i);
            if (findNextFocus == null && z2) {
                ᐝ();
                if (ˊ(view) == null) {
                    return null;
                }
                ʼ();
                ॱ = this.ˋॱ.ˎ(view, i, this.ˋ, this.ˋˊ);
                ˎ(false);
            } else {
                ॱ = findNextFocus;
            }
        }
        if (ॱ == null || ॱ.hasFocusable()) {
            if (!ˎ(view, ॱ, i)) {
                ॱ = super.focusSearch(view, i);
            }
            return ॱ;
        } else if (getFocusedChild() == null) {
            return super.focusSearch(view, i);
        } else {
            ˊ(ॱ, null);
            return view;
        }
    }

    private boolean ˎ(View view, View view2, int i) {
        boolean z = true;
        boolean z2 = false;
        if (view2 == null || view2 == this) {
            return false;
        }
        if (ˊ(view2) == null) {
            return false;
        }
        if (view == null || ˊ(view) == null) {
            return true;
        }
        int i2;
        this.ˏॱ.set(0, 0, view.getWidth(), view.getHeight());
        this.ᐝˊ.set(0, 0, view2.getWidth(), view2.getHeight());
        offsetDescendantRectToMyCoords(view, this.ˏॱ);
        offsetDescendantRectToMyCoords(view2, this.ᐝˊ);
        int i3 = this.ˋॱ.ʽॱ() == 1 ? -1 : 1;
        if ((this.ˏॱ.left < this.ᐝˊ.left || this.ˏॱ.right <= this.ᐝˊ.left) && this.ˏॱ.right < this.ᐝˊ.right) {
            i2 = 1;
        } else if ((this.ˏॱ.right > this.ᐝˊ.right || this.ˏॱ.left >= this.ᐝˊ.right) && this.ˏॱ.left > this.ᐝˊ.left) {
            i2 = -1;
        } else {
            i2 = 0;
        }
        if ((this.ˏॱ.top < this.ᐝˊ.top || this.ˏॱ.bottom <= this.ᐝˊ.top) && this.ˏॱ.bottom < this.ᐝˊ.bottom) {
            z = true;
        } else if ((this.ˏॱ.bottom <= this.ᐝˊ.bottom && this.ˏॱ.top < this.ᐝˊ.bottom) || this.ˏॱ.top <= this.ᐝˊ.top) {
            z = false;
        }
        switch (i) {
            case 1:
                if (z >= false || (!z && i3 * i2 <= 0)) {
                    z2 = true;
                }
                return z2;
            case 2:
                if (z <= false || (!z && i3 * i2 >= 0)) {
                    z2 = true;
                }
                return z2;
            case 17:
                if (i2 >= 0) {
                    return false;
                }
                return true;
            case 33:
                if (z < false) {
                    return false;
                }
                return true;
            case o.fc.c.ꓸॱ /*66*/:
                if (i2 <= 0) {
                    return false;
                }
                return true;
            case 130:
                if (z > false) {
                    return false;
                }
                return true;
            default:
                throw new IllegalArgumentException("Invalid direction: " + i + ˎ());
        }
    }

    public void requestChildFocus(View view, View view2) {
        if (!(this.ˋॱ.ˋ(this, this.ˋˊ, view, view2) || view2 == null)) {
            ˊ(view, view2);
        }
        super.requestChildFocus(view, view2);
    }

    private void ˊ(@NonNull View view, @Nullable View view2) {
        boolean z = true;
        View view3 = view2 != null ? view2 : view;
        this.ˏॱ.set(0, 0, view3.getWidth(), view3.getHeight());
        android.view.ViewGroup.LayoutParams layoutParams = view3.getLayoutParams();
        if (layoutParams instanceof LayoutParams) {
            LayoutParams layoutParams2 = (LayoutParams) layoutParams;
            if (!layoutParams2.ˋ) {
                Rect rect = layoutParams2.ˏ;
                Rect rect2 = this.ˏॱ;
                rect2.left -= rect.left;
                rect2 = this.ˏॱ;
                rect2.right += rect.right;
                rect2 = this.ˏॱ;
                rect2.top -= rect.top;
                rect2 = this.ˏॱ;
                rect2.bottom = rect.bottom + rect2.bottom;
            }
        }
        if (view2 != null) {
            offsetDescendantRectToMyCoords(view2, this.ˏॱ);
            offsetRectIntoDescendantCoords(view, this.ˏॱ);
        }
        j jVar = this.ˋॱ;
        Rect rect3 = this.ˏॱ;
        boolean z2 = !this.ʻॱ;
        if (view2 != null) {
            z = false;
        }
        jVar.ˋ(this, view, rect3, z2, z);
    }

    public boolean requestChildRectangleOnScreen(View view, Rect rect, boolean z) {
        return this.ˋॱ.ˊ(this, view, rect, z);
    }

    public void addFocusables(ArrayList<View> arrayList, int i, int i2) {
        if (this.ˋॱ == null || !this.ˋॱ.ˊ(this, (ArrayList) arrayList, i, i2)) {
            super.addFocusables(arrayList, i, i2);
        }
    }

    protected boolean onRequestFocusInDescendants(int i, Rect rect) {
        if (ᐝॱ()) {
            return false;
        }
        return super.onRequestFocusInDescendants(i, rect);
    }

    /* JADX WARNING: inconsistent code. */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    protected void onAttachedToWindow() {
        /*
        r4 = this;
        r0 = 1;
        r1 = 0;
        super.onAttachedToWindow();
        r4.ᶥ = r1;
        r4.ॱᐝ = r0;
        r2 = r4.ʻॱ;
        if (r2 == 0) goto L_0x0068;
    L_0x000d:
        r2 = r4.isLayoutRequested();
        if (r2 != 0) goto L_0x0068;
    L_0x0013:
        r4.ʻॱ = r0;
        r0 = r4.ˋॱ;
        if (r0 == 0) goto L_0x001e;
    L_0x0019:
        r0 = r4.ˋॱ;
        r0.ˊ(r4);
    L_0x001e:
        r4.ˌ = r1;
        r0 = ॱ;
        if (r0 == 0) goto L_0x0067;
    L_0x0024:
        r0 = o.md.ˏ;
        r0 = r0.get();
        r0 = (o.md) r0;
        r4.ˊˊ = r0;
        r0 = r4.ˊˊ;
        if (r0 != 0) goto L_0x0062;
    L_0x0032:
        r0 = new o.md;
        r0.<init>();
        r4.ˊˊ = r0;
        r0 = androidx.core.view.ViewCompat.ˍ(r4);
        r1 = 1114636288; // 0x42700000 float:60.0 double:5.507034975E-315;
        r2 = r4.isInEditMode();
        if (r2 != 0) goto L_0x006a;
    L_0x0045:
        if (r0 == 0) goto L_0x006a;
    L_0x0047:
        r0 = r0.getRefreshRate();
        r2 = 1106247680; // 0x41f00000 float:30.0 double:5.465589745E-315;
        r2 = (r0 > r2 ? 1 : (r0 == r2 ? 0 : -1));
        if (r2 < 0) goto L_0x006a;
    L_0x0051:
        r1 = r4.ˊˊ;
        r2 = 1315859240; // 0x4e6e6b28 float:1.0E9 double:6.50120845E-315;
        r0 = r2 / r0;
        r2 = (long) r0;
        r1.ॱ = r2;
        r0 = o.md.ˏ;
        r1 = r4.ˊˊ;
        r0.set(r1);
    L_0x0062:
        r0 = r4.ˊˊ;
        r0.ˏ(r4);
    L_0x0067:
        return;
    L_0x0068:
        r0 = r1;
        goto L_0x0013;
    L_0x006a:
        r0 = r1;
        goto L_0x0051;
        */
        throw new UnsupportedOperationException("Method not decompiled: androidx.recyclerview.widget.RecyclerView.onAttachedToWindow():void");
    }

    protected void onDetachedFromWindow() {
        super.onDetachedFromWindow();
        if (this.ˊˋ != null) {
            this.ˊˋ.ˏ();
        }
        ॱॱ();
        this.ॱᐝ = false;
        if (this.ˋॱ != null) {
            this.ˋॱ.ॱ(this, this.ˋ);
        }
        this.ˑ.clear();
        removeCallbacks(this.ˎͺ);
        this.ᐝ.ˏ();
        if (ॱ && this.ˊˊ != null) {
            this.ˊˊ.ˎ(this);
            this.ˊˊ = null;
        }
    }

    public boolean isAttachedToWindow() {
        return this.ॱᐝ;
    }

    void ˊ(String str) {
        if (ᐝॱ()) {
            if (str == null) {
                throw new IllegalStateException("Cannot call this method while RecyclerView is computing a layout or scrolling" + ˎ());
            }
            throw new IllegalStateException(str);
        } else if (this.ꜞ > 0) {
            Log.w("RecyclerView", "Cannot call this method in a scroll callback. Scroll callbacks mightbe run during a measure & layout pass where you cannot change theRecyclerView data. Any method call that might change the structureof the RecyclerView or the adapter contents should be postponed tothe next frame.", new IllegalStateException("" + ˎ()));
        }
    }

    public void ˏ(@NonNull g gVar) {
        this.ᐝˋ.add(gVar);
    }

    public void ॱ(@NonNull g gVar) {
        this.ᐝˋ.remove(gVar);
        if (this.ᐨ == gVar) {
            this.ᐨ = null;
        }
    }

    private boolean ˊ(MotionEvent motionEvent) {
        int action = motionEvent.getAction();
        if (action == 3 || action == 0) {
            this.ᐨ = null;
        }
        int size = this.ᐝˋ.size();
        int i = 0;
        while (i < size) {
            g gVar = (g) this.ᐝˋ.get(i);
            if (!gVar.ˋ(this, motionEvent) || action == 3) {
                i++;
            } else {
                this.ᐨ = gVar;
                return true;
            }
        }
        return false;
    }

    private boolean ॱ(MotionEvent motionEvent) {
        int action = motionEvent.getAction();
        if (this.ᐨ != null) {
            if (action == 0) {
                this.ᐨ = null;
            } else {
                this.ᐨ.ॱ(this, motionEvent);
                if (action == 3 || action == 1) {
                    this.ᐨ = null;
                }
                return true;
            }
        }
        if (action != 0) {
            int size = this.ᐝˋ.size();
            for (int i = 0; i < size; i++) {
                g gVar = (g) this.ᐝˋ.get(i);
                if (gVar.ˋ(this, motionEvent)) {
                    this.ᐨ = gVar;
                    return true;
                }
            }
        }
        return false;
    }

    public boolean onInterceptTouchEvent(MotionEvent motionEvent) {
        if (this.ʽॱ) {
            return false;
        }
        if (ˊ(motionEvent)) {
            ͺॱ();
            return true;
        } else if (this.ˋॱ == null) {
            return false;
        } else {
            boolean ʻ = this.ˋॱ.ʻ();
            boolean ʼ = this.ˋॱ.ʼ();
            if (this.ʻˊ == null) {
                this.ʻˊ = VelocityTracker.obtain();
            }
            this.ʻˊ.addMovement(motionEvent);
            int actionMasked = motionEvent.getActionMasked();
            int actionIndex = motionEvent.getActionIndex();
            int i;
            switch (actionMasked) {
                case 0:
                    if (this.ᐝᐝ) {
                        this.ᐝᐝ = false;
                    }
                    this.ʻˋ = motionEvent.getPointerId(0);
                    actionMasked = (int) (motionEvent.getX() + 0.5f);
                    this.ʽᐝ = actionMasked;
                    this.ʼˋ = actionMasked;
                    actionMasked = (int) (motionEvent.getY() + 0.5f);
                    this.ʾॱ = actionMasked;
                    this.ʻᐝ = actionMasked;
                    if (this.ʼˊ == 2) {
                        getParent().requestDisallowInterceptTouchEvent(true);
                        ॱ(1);
                    }
                    int[] iArr = this.ˏͺ;
                    this.ˏͺ[1] = 0;
                    iArr[0] = 0;
                    if (ʻ) {
                        i = 1;
                    } else {
                        i = 0;
                    }
                    if (ʼ) {
                        i |= 2;
                    }
                    ॱॱ(i, 0);
                    break;
                case 1:
                    this.ʻˊ.clear();
                    ˊ(0);
                    break;
                case 2:
                    actionMasked = motionEvent.findPointerIndex(this.ʻˋ);
                    if (actionMasked >= 0) {
                        actionIndex = (int) (motionEvent.getX(actionMasked) + 0.5f);
                        actionMasked = (int) (motionEvent.getY(actionMasked) + 0.5f);
                        if (this.ʼˊ != 1) {
                            int i2 = actionIndex - this.ʼˋ;
                            int i3 = actionMasked - this.ʻᐝ;
                            if (!ʻ || Math.abs(i2) <= this.ʼᐝ) {
                                ʻ = false;
                            } else {
                                this.ʽᐝ = actionIndex;
                                ʻ = true;
                            }
                            if (ʼ && Math.abs(i3) > this.ʼᐝ) {
                                this.ʾॱ = actionMasked;
                                ʻ = true;
                            }
                            if (ʻ) {
                                ॱ(1);
                                break;
                            }
                        }
                    }
                    Log.e("RecyclerView", "Error processing scroll; pointer index for id " + this.ʻˋ + " not found. Did any MotionEvents get skipped?");
                    return false;
                    break;
                case 3:
                    ͺॱ();
                    break;
                case 5:
                    this.ʻˋ = motionEvent.getPointerId(actionIndex);
                    i = (int) (motionEvent.getX(actionIndex) + 0.5f);
                    this.ʽᐝ = i;
                    this.ʼˋ = i;
                    i = (int) (motionEvent.getY(actionIndex) + 0.5f);
                    this.ʾॱ = i;
                    this.ʻᐝ = i;
                    break;
                case 6:
                    ˋ(motionEvent);
                    break;
            }
            if (this.ʼˊ == 1) {
                ʻ = true;
            } else {
                ʻ = false;
            }
            return ʻ;
        }
    }

    public void requestDisallowInterceptTouchEvent(boolean z) {
        int size = this.ᐝˋ.size();
        for (int i = 0; i < size; i++) {
            ((g) this.ᐝˋ.get(i)).ˎ(z);
        }
        super.requestDisallowInterceptTouchEvent(z);
    }

    public boolean onTouchEvent(MotionEvent motionEvent) {
        boolean z = false;
        if (this.ʽॱ || this.ᐝᐝ) {
            return false;
        }
        if (ॱ(motionEvent)) {
            ͺॱ();
            return true;
        } else if (this.ˋॱ == null) {
            return false;
        } else {
            boolean ʻ = this.ˋॱ.ʻ();
            boolean ʼ = this.ˋॱ.ʼ();
            if (this.ʻˊ == null) {
                this.ʻˊ = VelocityTracker.obtain();
            }
            MotionEvent obtain = MotionEvent.obtain(motionEvent);
            int actionMasked = motionEvent.getActionMasked();
            int actionIndex = motionEvent.getActionIndex();
            if (actionMasked == 0) {
                int[] iArr = this.ˏͺ;
                this.ˏͺ[1] = 0;
                iArr[0] = 0;
            }
            obtain.offsetLocation((float) this.ˏͺ[0], (float) this.ˏͺ[1]);
            switch (actionMasked) {
                case 0:
                    this.ʻˋ = motionEvent.getPointerId(0);
                    actionMasked = (int) (motionEvent.getX() + 0.5f);
                    this.ʽᐝ = actionMasked;
                    this.ʼˋ = actionMasked;
                    actionMasked = (int) (motionEvent.getY() + 0.5f);
                    this.ʾॱ = actionMasked;
                    this.ʻᐝ = actionMasked;
                    if (ʻ) {
                        actionMasked = 1;
                    } else {
                        actionMasked = 0;
                    }
                    if (ʼ) {
                        actionMasked |= 2;
                    }
                    ॱॱ(actionMasked, 0);
                    break;
                case 1:
                    this.ʻˊ.addMovement(obtain);
                    this.ʻˊ.computeCurrentVelocity(1000, (float) this.ˈॱ);
                    float f = ʻ ? -this.ʻˊ.getXVelocity(this.ʻˋ) : 0.0f;
                    float f2;
                    if (ʼ) {
                        f2 = -this.ʻˊ.getYVelocity(this.ʻˋ);
                    } else {
                        f2 = 0.0f;
                    }
                    if ((f == 0.0f && r0 == 0.0f) || !ॱ((int) f, (int) r0)) {
                        ॱ(0);
                    }
                    ˎˏ();
                    z = true;
                    break;
                case 2:
                    actionMasked = motionEvent.findPointerIndex(this.ʻˋ);
                    if (actionMasked >= 0) {
                        int x = (int) (motionEvent.getX(actionMasked) + 0.5f);
                        int y = (int) (motionEvent.getY(actionMasked) + 0.5f);
                        int i = this.ʽᐝ - x;
                        actionIndex = this.ʾॱ - y;
                        if (ˋ(i, actionIndex, this.ˍ, this.ͺˏ, 0)) {
                            i -= this.ˍ[0];
                            actionIndex -= this.ˍ[1];
                            obtain.offsetLocation((float) this.ͺˏ[0], (float) this.ͺˏ[1]);
                            int[] iArr2 = this.ˏͺ;
                            iArr2[0] = iArr2[0] + this.ͺˏ[0];
                            iArr2 = this.ˏͺ;
                            iArr2[1] = iArr2[1] + this.ͺˏ[1];
                        }
                        if (this.ʼˊ != 1) {
                            boolean z2;
                            if (!ʻ || Math.abs(i) <= this.ʼᐝ) {
                                z2 = false;
                            } else {
                                if (i > 0) {
                                    actionMasked = i - this.ʼᐝ;
                                } else {
                                    actionMasked = this.ʼᐝ + i;
                                }
                                i = actionMasked;
                                z2 = true;
                            }
                            if (ʼ && Math.abs(actionIndex) > this.ʼᐝ) {
                                if (actionIndex > 0) {
                                    actionMasked = actionIndex - this.ʼᐝ;
                                } else {
                                    actionMasked = this.ʼᐝ + actionIndex;
                                }
                                actionIndex = actionMasked;
                                z2 = true;
                            }
                            if (z2) {
                                ॱ(1);
                            }
                        }
                        if (this.ʼˊ == 1) {
                            this.ʽᐝ = x - this.ͺˏ[0];
                            this.ʾॱ = y - this.ͺˏ[1];
                            int i2 = ʻ ? i : 0;
                            if (ʼ) {
                                actionMasked = actionIndex;
                            } else {
                                actionMasked = 0;
                            }
                            if (ˋ(i2, actionMasked, obtain)) {
                                getParent().requestDisallowInterceptTouchEvent(true);
                            }
                            if (!(this.ˊˊ == null || (i == 0 && actionIndex == 0))) {
                                this.ˊˊ.ˎ(this, i, actionIndex);
                                break;
                            }
                        }
                    }
                    Log.e("RecyclerView", "Error processing scroll; pointer index for id " + this.ʻˋ + " not found. Did any MotionEvents get skipped?");
                    return false;
                    break;
                case 3:
                    ͺॱ();
                    break;
                case 5:
                    this.ʻˋ = motionEvent.getPointerId(actionIndex);
                    actionMasked = (int) (motionEvent.getX(actionIndex) + 0.5f);
                    this.ʽᐝ = actionMasked;
                    this.ʼˋ = actionMasked;
                    actionMasked = (int) (motionEvent.getY(actionIndex) + 0.5f);
                    this.ʾॱ = actionMasked;
                    this.ʻᐝ = actionMasked;
                    break;
                case 6:
                    ˋ(motionEvent);
                    break;
            }
            if (!z) {
                this.ʻˊ.addMovement(obtain);
            }
            obtain.recycle();
            return true;
        }
    }

    private void ˎˏ() {
        if (this.ʻˊ != null) {
            this.ʻˊ.clear();
        }
        ˊ(0);
        ˑ();
    }

    private void ͺॱ() {
        ˎˏ();
        ॱ(0);
    }

    private void ˋ(MotionEvent motionEvent) {
        int actionIndex = motionEvent.getActionIndex();
        if (motionEvent.getPointerId(actionIndex) == this.ʻˋ) {
            actionIndex = actionIndex == 0 ? 1 : 0;
            this.ʻˋ = motionEvent.getPointerId(actionIndex);
            int x = (int) (motionEvent.getX(actionIndex) + 0.5f);
            this.ʽᐝ = x;
            this.ʼˋ = x;
            actionIndex = (int) (motionEvent.getY(actionIndex) + 0.5f);
            this.ʾॱ = actionIndex;
            this.ʻᐝ = actionIndex;
        }
    }

    public boolean onGenericMotionEvent(MotionEvent motionEvent) {
        if (!(this.ˋॱ == null || this.ʽॱ || motionEvent.getAction() != 8)) {
            float f;
            float f2;
            if ((motionEvent.getSource() & 2) != 0) {
                if (this.ˋॱ.ʼ()) {
                    f = -motionEvent.getAxisValue(9);
                } else {
                    f = 0.0f;
                }
                if (this.ˋॱ.ʻ()) {
                    f2 = f;
                    f = motionEvent.getAxisValue(10);
                } else {
                    f2 = f;
                    f = 0.0f;
                }
            } else if ((motionEvent.getSource() & 4194304) != 0) {
                f = motionEvent.getAxisValue(26);
                if (this.ˋॱ.ʼ()) {
                    f2 = -f;
                    f = 0.0f;
                } else if (this.ˋॱ.ʻ()) {
                    f2 = 0.0f;
                } else {
                    f = 0.0f;
                    f2 = 0.0f;
                }
            } else {
                f = 0.0f;
                f2 = 0.0f;
            }
            if (!(f2 == 0.0f && f == 0.0f)) {
                ˋ((int) (f * this.ˉॱ), (int) (this.ʿॱ * f2), motionEvent);
            }
        }
        return false;
    }

    protected void onMeasure(int i, int i2) {
        boolean z = false;
        if (this.ˋॱ == null) {
            ˏ(i, i2);
        } else if (this.ˋॱ.ˋ()) {
            int mode = MeasureSpec.getMode(i);
            int mode2 = MeasureSpec.getMode(i2);
            this.ˋॱ.ˏ(this.ˋ, this.ˋˊ, i, i2);
            if (mode == 1073741824 && mode2 == 1073741824) {
                z = true;
            }
            if (!z && this.ˊॱ != null) {
                if (this.ˋˊ.ˏ == 1) {
                    ᐝˊ();
                }
                this.ˋॱ.ˋ(i, i2);
                this.ˋˊ.ʻ = true;
                ᐝˋ();
                this.ˋॱ.ˏ(i, i2);
                if (this.ˋॱ.ˏॱ()) {
                    this.ˋॱ.ˋ(MeasureSpec.makeMeasureSpec(getMeasuredWidth(), 1073741824), MeasureSpec.makeMeasureSpec(getMeasuredHeight(), 1073741824));
                    this.ˋˊ.ʻ = true;
                    ᐝˋ();
                    this.ˋॱ.ˏ(i, i2);
                }
            }
        } else if (this.ॱˋ) {
            this.ˋॱ.ˏ(this.ˋ, this.ˋˊ, i, i2);
        } else {
            if (this.ʿ) {
                ʼ();
                ॱˋ();
                ॱʽ();
                ॱᐝ();
                if (this.ˋˊ.ˊॱ) {
                    this.ˋˊ.ʼ = true;
                } else {
                    this.ॱॱ.ॱ();
                    this.ˋˊ.ʼ = false;
                }
                this.ʿ = false;
                ˎ(false);
            } else if (this.ˋˊ.ˊॱ) {
                setMeasuredDimension(getMeasuredWidth(), getMeasuredHeight());
                return;
            }
            if (this.ˊॱ != null) {
                this.ˋˊ.ˋ = this.ˊॱ.ˏ();
            } else {
                this.ˋˊ.ˋ = 0;
            }
            ʼ();
            this.ˋॱ.ˏ(this.ˋ, this.ˋˊ, i, i2);
            ˎ(false);
            this.ˋˊ.ʼ = false;
        }
    }

    void ˏ(int i, int i2) {
        setMeasuredDimension(j.ˎ(i, getPaddingLeft() + getPaddingRight(), ViewCompat.ॱˊ(this)), j.ˎ(i2, getPaddingTop() + getPaddingBottom(), ViewCompat.ˋॱ(this)));
    }

    protected void onSizeChanged(int i, int i2, int i3, int i4) {
        super.onSizeChanged(i, i2, i3, i4);
        if (i != i3 || i2 != i4) {
            ॱˎ();
        }
    }

    public void setItemAnimator(@Nullable ItemAnimator itemAnimator) {
        if (this.ˊˋ != null) {
            this.ˊˋ.ˏ();
            this.ˊˋ.ˎ(null);
        }
        this.ˊˋ = itemAnimator;
        if (this.ˊˋ != null) {
            this.ˊˋ.ˎ(this.ˋʻ);
        }
    }

    public void ॱˋ() {
        this.ᶥ++;
    }

    void ॱᐝ() {
        ॱ(true);
    }

    public void ॱ(boolean z) {
        this.ᶥ--;
        if (this.ᶥ < 1) {
            this.ᶥ = 0;
            if (z) {
                ˏˎ();
                ˍ();
            }
        }
    }

    boolean ʻॱ() {
        return this.ꓸ != null && this.ꓸ.isEnabled();
    }

    private void ˏˎ() {
        int i = this.ㆍ;
        this.ㆍ = 0;
        if (i != 0 && ʻॱ()) {
            AccessibilityEvent obtain = AccessibilityEvent.obtain();
            obtain.setEventType(2048);
            ii.ˏ(obtain, i);
            sendAccessibilityEventUnchecked(obtain);
        }
    }

    public boolean ᐝॱ() {
        return this.ᶥ > 0;
    }

    boolean ॱ(AccessibilityEvent accessibilityEvent) {
        int i = 0;
        if (!ᐝॱ()) {
            return false;
        }
        int ˏ;
        if (accessibilityEvent != null) {
            ˏ = ii.ˏ(accessibilityEvent);
        } else {
            ˏ = 0;
        }
        if (ˏ != 0) {
            i = ˏ;
        }
        this.ㆍ = i | this.ㆍ;
        return true;
    }

    public void sendAccessibilityEventUnchecked(AccessibilityEvent accessibilityEvent) {
        if (!ॱ(accessibilityEvent)) {
            super.sendAccessibilityEventUnchecked(accessibilityEvent);
        }
    }

    @Nullable
    public ItemAnimator ʾ() {
        return this.ˊˋ;
    }

    void ʼॱ() {
        if (!this.ˌ && this.ॱᐝ) {
            ViewCompat.ˏ((View) this, this.ˎͺ);
            this.ˌ = true;
        }
    }

    private boolean ˏˏ() {
        return this.ˊˋ != null && this.ˋॱ.ˏ();
    }

    private void ॱʽ() {
        boolean z;
        boolean z2 = true;
        if (this.ʼॱ) {
            this.ॱॱ.ˊ();
            if (this.ʾ) {
                this.ˋॱ.ˎ(this);
            }
        }
        if (ˏˏ()) {
            this.ॱॱ.ˋ();
        } else {
            this.ॱॱ.ॱ();
        }
        boolean z3;
        if (this.ˋᐝ || this.ˋˋ) {
            z3 = true;
        } else {
            z3 = false;
        }
        t tVar = this.ˋˊ;
        if (!this.ʻॱ || this.ˊˋ == null || (!(this.ʼॱ || r0 || this.ˋॱ.ʼॱ) || (this.ʼॱ && !this.ˊॱ.ˋ()))) {
            z = false;
        } else {
            z = true;
        }
        tVar.ʽ = z;
        t tVar2 = this.ˋˊ;
        if (!(this.ˋˊ.ʽ && r0 && !this.ʼॱ && ˏˏ())) {
            z2 = false;
        }
        tVar2.ˊॱ = z2;
    }

    void ˈ() {
        if (this.ˊॱ == null) {
            Log.e("RecyclerView", "No adapter attached; skipping layout");
        } else if (this.ˋॱ == null) {
            Log.e("RecyclerView", "No layout manager attached; skipping layout");
        } else {
            this.ˋˊ.ʻ = false;
            if (this.ˋˊ.ˏ == 1) {
                ᐝˊ();
                this.ˋॱ.ॱॱ(this);
                ᐝˋ();
            } else if (!this.ॱॱ.ॱॱ() && this.ˋॱ.ˋˊ() == getWidth() && this.ˋॱ.ˉ() == getHeight()) {
                this.ˋॱ.ॱॱ(this);
            } else {
                this.ˋॱ.ॱॱ(this);
                ᐝˋ();
            }
            ᐧ();
        }
    }

    private void ॱͺ() {
        View focusedChild;
        if (this.ˊʼ && hasFocus() && this.ˊॱ != null) {
            focusedChild = getFocusedChild();
        } else {
            focusedChild = null;
        }
        s ˋ = focusedChild == null ? null : ˋ(focusedChild);
        if (ˋ == null) {
            ـ();
            return;
        }
        int i;
        this.ˋˊ.ˋॱ = this.ˊॱ.ˋ() ? ˋ.ʽ() : -1;
        t tVar = this.ˋˊ;
        if (this.ʼॱ) {
            i = -1;
        } else if (ˋ.ʻॱ()) {
            i = ˋ.ˋ;
        } else {
            i = ˋ.ˋ();
        }
        tVar.ॱˊ = i;
        this.ˋˊ.ˏॱ = ˏॱ(ˋ.ˊ);
    }

    private void ـ() {
        this.ˋˊ.ˋॱ = -1;
        this.ˋˊ.ॱˊ = -1;
        this.ˋˊ.ˏॱ = -1;
    }

    @Nullable
    private View ॱʻ() {
        int i = this.ˋˊ.ॱˊ != -1 ? this.ˋˊ.ॱˊ : 0;
        int ˏ = this.ˋˊ.ˏ();
        int i2 = i;
        while (i2 < ˏ) {
            s ˎ = ˎ(i2);
            if (ˎ == null) {
                break;
            } else if (ˎ.ˊ.hasFocusable()) {
                return ˎ.ˊ;
            } else {
                i2++;
            }
        }
        for (i = Math.min(ˏ, i) - 1; i >= 0; i--) {
            s ˎ2 = ˎ(i);
            if (ˎ2 == null) {
                return null;
            }
            if (ˎ2.ˊ.hasFocusable()) {
                return ˎ2.ˊ;
            }
        }
        return null;
    }

    /* JADX WARNING: inconsistent code. */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    private void ॱʼ() {
        /*
        r6 = this;
        r4 = -1;
        r1 = 0;
        r0 = r6.ˊʼ;
        if (r0 == 0) goto L_0x0027;
    L_0x0007:
        r0 = r6.ˊॱ;
        if (r0 == 0) goto L_0x0027;
    L_0x000b:
        r0 = r6.hasFocus();
        if (r0 == 0) goto L_0x0027;
    L_0x0011:
        r0 = r6.getDescendantFocusability();
        r2 = 393216; // 0x60000 float:5.51013E-40 double:1.942745E-318;
        if (r0 == r2) goto L_0x0027;
    L_0x0019:
        r0 = r6.getDescendantFocusability();
        r2 = 131072; // 0x20000 float:1.83671E-40 double:6.47582E-319;
        if (r0 != r2) goto L_0x0028;
    L_0x0021:
        r0 = r6.isFocused();
        if (r0 == 0) goto L_0x0028;
    L_0x0027:
        return;
    L_0x0028:
        r0 = r6.isFocused();
        if (r0 != 0) goto L_0x0056;
    L_0x002e:
        r0 = r6.getFocusedChild();
        r2 = ॱͺ;
        if (r2 == 0) goto L_0x004e;
    L_0x0036:
        r2 = r0.getParent();
        if (r2 == 0) goto L_0x0042;
    L_0x003c:
        r2 = r0.hasFocus();
        if (r2 != 0) goto L_0x004e;
    L_0x0042:
        r0 = r6.ʼ;
        r0 = r0.ˊ();
        if (r0 != 0) goto L_0x0056;
    L_0x004a:
        r6.requestFocus();
        goto L_0x0027;
    L_0x004e:
        r2 = r6.ʼ;
        r0 = r2.ˋ(r0);
        if (r0 == 0) goto L_0x0027;
    L_0x0056:
        r0 = r6.ˋˊ;
        r2 = r0.ˋॱ;
        r0 = (r2 > r4 ? 1 : (r2 == r4 ? 0 : -1));
        if (r0 == 0) goto L_0x00b3;
    L_0x005e:
        r0 = r6.ˊॱ;
        r0 = r0.ˋ();
        if (r0 == 0) goto L_0x00b3;
    L_0x0066:
        r0 = r6.ˋˊ;
        r2 = r0.ˋॱ;
        r0 = r6.ˏ(r2);
    L_0x006e:
        if (r0 == 0) goto L_0x0082;
    L_0x0070:
        r2 = r6.ʼ;
        r3 = r0.ˊ;
        r2 = r2.ˋ(r3);
        if (r2 != 0) goto L_0x0082;
    L_0x007a:
        r2 = r0.ˊ;
        r2 = r2.hasFocusable();
        if (r2 != 0) goto L_0x00ae;
    L_0x0082:
        r0 = r6.ʼ;
        r0 = r0.ˊ();
        if (r0 <= 0) goto L_0x008e;
    L_0x008a:
        r1 = r6.ॱʻ();
    L_0x008e:
        if (r1 == 0) goto L_0x0027;
    L_0x0090:
        r0 = r6.ˋˊ;
        r0 = r0.ˏॱ;
        r2 = (long) r0;
        r0 = (r2 > r4 ? 1 : (r2 == r4 ? 0 : -1));
        if (r0 == 0) goto L_0x00b1;
    L_0x0099:
        r0 = r6.ˋˊ;
        r0 = r0.ˏॱ;
        r0 = r1.findViewById(r0);
        if (r0 == 0) goto L_0x00b1;
    L_0x00a3:
        r2 = r0.isFocusable();
        if (r2 == 0) goto L_0x00b1;
    L_0x00a9:
        r0.requestFocus();
        goto L_0x0027;
    L_0x00ae:
        r1 = r0.ˊ;
        goto L_0x008e;
    L_0x00b1:
        r0 = r1;
        goto L_0x00a9;
    L_0x00b3:
        r0 = r1;
        goto L_0x006e;
        */
        throw new UnsupportedOperationException("Method not decompiled: androidx.recyclerview.widget.RecyclerView.ॱʼ():void");
    }

    private int ˏॱ(View view) {
        int id = view.getId();
        View view2 = view;
        while (!view2.isFocused() && (view2 instanceof ViewGroup) && view2.hasFocus()) {
            int id2;
            view = ((ViewGroup) view2).getFocusedChild();
            if (view.getId() != -1) {
                id2 = view.getId();
            } else {
                id2 = id;
            }
            id = id2;
            view2 = view;
        }
        return id;
    }

    final void ॱ(t tVar) {
        if (ʽ() == 2) {
            OverScroller overScroller = this.ˊᐝ.ˎ;
            tVar.ͺ = overScroller.getFinalX() - overScroller.getCurrX();
            tVar.ॱˋ = overScroller.getFinalY() - overScroller.getCurrY();
            return;
        }
        tVar.ͺ = 0;
        tVar.ॱˋ = 0;
    }

    private void ᐝˊ() {
        int ˊ;
        int i;
        s ˏ;
        boolean z = true;
        this.ˋˊ.ˏ(1);
        ॱ(this.ˋˊ);
        this.ˋˊ.ʻ = false;
        ʼ();
        this.ᐝ.ॱ();
        ॱˋ();
        ॱʽ();
        ॱͺ();
        t tVar = this.ˋˊ;
        if (!(this.ˋˊ.ʽ && this.ˋˋ)) {
            z = false;
        }
        tVar.ᐝ = z;
        this.ˋˋ = false;
        this.ˋᐝ = false;
        this.ˋˊ.ʼ = this.ˋˊ.ˊॱ;
        this.ˋˊ.ˋ = this.ˊॱ.ˏ();
        ˏ(this.ˋʼ);
        if (this.ˋˊ.ʽ) {
            ˊ = this.ʼ.ˊ();
            for (i = 0; i < ˊ; i++) {
                ˏ = ˏ(this.ʼ.ˎ(i));
                if (!ˏ.G_() && (!ˏ.ॱˊ() || this.ˊॱ.ˋ())) {
                    this.ᐝ.ˋ(ˏ, this.ˊˋ.ˊ(this.ˋˊ, ˏ, ItemAnimator.ˏ(ˏ), ˏ.ʽॱ()));
                    if (!(!this.ˋˊ.ᐝ || !ˏ.ˊᐝ() || ˏ.ʻॱ() || ˏ.G_() || ˏ.ॱˊ())) {
                        this.ᐝ.ˋ(ˎ(ˏ), ˏ);
                    }
                }
            }
        }
        if (this.ˋˊ.ˊॱ) {
            ʿ();
            z = this.ˋˊ.ॱॱ;
            this.ˋˊ.ॱॱ = false;
            this.ˋॱ.ˋ(this.ˋ, this.ˋˊ);
            this.ˋˊ.ॱॱ = z;
            for (i = 0; i < this.ʼ.ˊ(); i++) {
                ˏ = ˏ(this.ʼ.ˎ(i));
                if (!(ˏ.G_() || this.ᐝ.ˎ(ˏ))) {
                    ˊ = ItemAnimator.ˏ(ˏ);
                    boolean ˊ2 = ˏ.ˊ(8192);
                    if (!ˊ2) {
                        ˊ |= 4096;
                    }
                    c ˊ3 = this.ˊˋ.ˊ(this.ˋˊ, ˏ, ˊ, ˏ.ʽॱ());
                    if (ˊ2) {
                        ˏ(ˏ, ˊ3);
                    } else {
                        this.ᐝ.ˊ(ˏ, ˊ3);
                    }
                }
            }
            ˉ();
        } else {
            ˉ();
        }
        ॱᐝ();
        ˎ(false);
        this.ˋˊ.ˏ = 2;
    }

    private void ᐝˋ() {
        boolean z;
        ʼ();
        ॱˋ();
        this.ˋˊ.ˏ(6);
        this.ॱॱ.ॱ();
        this.ˋˊ.ˋ = this.ˊॱ.ˏ();
        this.ˋˊ.ॱ = 0;
        this.ˋˊ.ʼ = false;
        this.ˋॱ.ˋ(this.ˋ, this.ˋˊ);
        this.ˋˊ.ॱॱ = false;
        this.ॱʽ = null;
        t tVar = this.ˋˊ;
        if (!this.ˋˊ.ʽ || this.ˊˋ == null) {
            z = false;
        } else {
            z = true;
        }
        tVar.ʽ = z;
        this.ˋˊ.ˏ = 4;
        ॱᐝ();
        ˎ(false);
    }

    private void ᐧ() {
        this.ˋˊ.ˏ(4);
        ʼ();
        ॱˋ();
        this.ˋˊ.ˏ = 1;
        if (this.ˋˊ.ʽ) {
            for (int ˊ = this.ʼ.ˊ() - 1; ˊ >= 0; ˊ--) {
                s ˏ = ˏ(this.ʼ.ˎ(ˊ));
                if (!ˏ.G_()) {
                    long ˎ = ˎ(ˏ);
                    c ˊ2 = this.ˊˋ.ˊ(this.ˋˊ, ˏ);
                    s ˏ2 = this.ᐝ.ˏ(ˎ);
                    if (ˏ2 == null || ˏ2.G_()) {
                        this.ᐝ.ˏ(ˏ, ˊ2);
                    } else {
                        boolean ˊ3 = this.ᐝ.ˊ(ˏ2);
                        boolean ˊ4 = this.ᐝ.ˊ(ˏ);
                        if (ˊ3 && ˏ2 == ˏ) {
                            this.ᐝ.ˏ(ˏ, ˊ2);
                        } else {
                            c ॱ = this.ᐝ.ॱ(ˏ2);
                            this.ᐝ.ˏ(ˏ, ˊ2);
                            c ˋ = this.ᐝ.ˋ(ˏ);
                            if (ॱ == null) {
                                ˏ(ˎ, ˏ, ˏ2);
                            } else {
                                ˎ(ˏ2, ˏ, ॱ, ˋ, ˊ3, ˊ4);
                            }
                        }
                    }
                }
            }
            this.ᐝ.ˋ(this.ˑॱ);
        }
        this.ˋॱ.ˋ(this.ˋ);
        this.ˋˊ.ˎ = this.ˋˊ.ˋ;
        this.ʼॱ = false;
        this.ʾ = false;
        this.ˋˊ.ʽ = false;
        this.ˋˊ.ˊॱ = false;
        this.ˋॱ.ʼॱ = false;
        if (this.ˋ.ˎ != null) {
            this.ˋ.ˎ.clear();
        }
        if (this.ˋॱ.ʽॱ) {
            this.ˋॱ.ʾ = 0;
            this.ˋॱ.ʽॱ = false;
            this.ˋ.ˊ();
        }
        this.ˋॱ.ˋ(this.ˋˊ);
        ॱᐝ();
        ˎ(false);
        this.ᐝ.ॱ();
        if (ˏॱ(this.ˋʼ[0], this.ˋʼ[1])) {
            ᐝ(0, 0);
        }
        ॱʼ();
        ـ();
    }

    private void ˏ(long j, s sVar, s sVar2) {
        int ˊ = this.ʼ.ˊ();
        int i = 0;
        while (i < ˊ) {
            s ˏ = ˏ(this.ʼ.ˎ(i));
            if (ˏ == sVar || ˎ(ˏ) != j) {
                i++;
            } else if (this.ˊॱ == null || !this.ˊॱ.ˋ()) {
                throw new IllegalStateException("Two different ViewHolders have the same change ID. This might happen due to inconsistent Adapter update events or if the LayoutManager lays out the same View multiple times.\n ViewHolder 1:" + ˏ + " \n View Holder 2:" + sVar + ˎ());
            } else {
                throw new IllegalStateException("Two different ViewHolders have the same stable ID. Stable IDs in your adapter MUST BE unique and SHOULD NOT change.\n ViewHolder 1:" + ˏ + " \n View Holder 2:" + sVar + ˎ());
            }
        }
        Log.e("RecyclerView", "Problem while matching changed view holders with the newones. The pre-layout information for the change holder " + sVar2 + " cannot be found but it is necessary for " + sVar + ˎ());
    }

    void ˏ(s sVar, c cVar) {
        sVar.ˊ(0, 8192);
        if (this.ˋˊ.ᐝ && sVar.ˊᐝ() && !sVar.ʻॱ() && !sVar.G_()) {
            this.ᐝ.ˋ(ˎ(sVar), sVar);
        }
        this.ᐝ.ˋ(sVar, cVar);
    }

    private void ˏ(int[] iArr) {
        int ˊ = this.ʼ.ˊ();
        if (ˊ == 0) {
            iArr[0] = -1;
            iArr[1] = -1;
            return;
        }
        int i = ActivityChooserViewAdapter.MAX_ACTIVITY_COUNT_UNLIMITED;
        int i2 = Integer.MIN_VALUE;
        int i3 = 0;
        while (i3 < ˊ) {
            int i4;
            s ˏ = ˏ(this.ʼ.ˎ(i3));
            if (ˏ.G_()) {
                i4 = i;
            } else {
                i4 = ˏ.ˏ();
                if (i4 < i) {
                    i = i4;
                }
                if (i4 > i2) {
                    i2 = i4;
                    i4 = i;
                } else {
                    i4 = i;
                }
            }
            i3++;
            i = i4;
        }
        iArr[0] = i;
        iArr[1] = i2;
    }

    private boolean ˏॱ(int i, int i2) {
        ˏ(this.ˋʼ);
        if (this.ˋʼ[0] == i && this.ˋʼ[1] == i2) {
            return false;
        }
        return true;
    }

    protected void removeDetachedView(View view, boolean z) {
        s ˏ = ˏ(view);
        if (ˏ != null) {
            if (ˏ.ॱˋ()) {
                ˏ.ˊॱ();
            } else if (!ˏ.G_()) {
                throw new IllegalArgumentException("Called removeDetachedView with a view which is not flagged as tmp detached." + ˏ + ˎ());
            }
        }
        view.clearAnimation();
        ˋॱ(view);
        super.removeDetachedView(view, z);
    }

    long ˎ(s sVar) {
        return this.ˊॱ.ˋ() ? sVar.ʽ() : (long) sVar.ˎ;
    }

    void ˋ(@NonNull s sVar, @Nullable c cVar, @NonNull c cVar2) {
        sVar.ॱ(false);
        if (this.ˊˋ.ˊ(sVar, cVar, cVar2)) {
            ʼॱ();
        }
    }

    void ˊ(@NonNull s sVar, @NonNull c cVar, @Nullable c cVar2) {
        ˊ(sVar);
        sVar.ॱ(false);
        if (this.ˊˋ.ˏ(sVar, cVar, cVar2)) {
            ʼॱ();
        }
    }

    private void ˎ(@NonNull s sVar, @NonNull s sVar2, @NonNull c cVar, @NonNull c cVar2, boolean z, boolean z2) {
        sVar.ॱ(false);
        if (z) {
            ˊ(sVar);
        }
        if (sVar != sVar2) {
            if (z2) {
                ˊ(sVar2);
            }
            sVar.ᐝ = sVar2;
            ˊ(sVar);
            this.ˋ.ॱ(sVar);
            sVar2.ॱ(false);
            sVar2.ʽ = sVar;
        }
        if (this.ˊˋ.ˋ(sVar, sVar2, cVar, cVar2)) {
            ʼॱ();
        }
    }

    protected void onLayout(boolean z, int i, int i2, int i3, int i4) {
        gp.ˏ("RV OnLayout");
        ˈ();
        gp.ˊ();
        this.ʻॱ = true;
    }

    public void requestLayout() {
        if (this.ᐧ != 0 || this.ʽॱ) {
            this.ˈ = true;
        } else {
            super.requestLayout();
        }
    }

    void ʽॱ() {
        int ˋ = this.ʼ.ˋ();
        for (int i = 0; i < ˋ; i++) {
            ((LayoutParams) this.ʼ.ˋ(i).getLayoutParams()).ˋ = true;
        }
        this.ˋ.ʼ();
    }

    public void draw(Canvas canvas) {
        int i;
        int i2;
        int i3 = 1;
        int i4 = 0;
        super.draw(canvas);
        int size = this.ॱˎ.size();
        for (i = 0; i < size; i++) {
            ((f) this.ॱˎ.get(i)).ˋ(canvas, this, this.ˋˊ);
        }
        if (this.ꞌ == null || this.ꞌ.isFinished()) {
            i2 = 0;
        } else {
            i = canvas.save();
            i2 = this.ʻ ? getPaddingBottom() : 0;
            canvas.rotate(270.0f);
            canvas.translate((float) (i2 + (-getHeight())), 0.0f);
            if (this.ꞌ == null || !this.ꞌ.draw(canvas)) {
                i2 = 0;
            } else {
                i2 = 1;
            }
            canvas.restoreToCount(i);
        }
        if (!(this.ʹ == null || this.ʹ.isFinished())) {
            size = canvas.save();
            if (this.ʻ) {
                canvas.translate((float) getPaddingLeft(), (float) getPaddingTop());
            }
            if (this.ʹ == null || !this.ʹ.draw(canvas)) {
                i = 0;
            } else {
                i = 1;
            }
            i2 |= i;
            canvas.restoreToCount(size);
        }
        if (!(this.ﹳ == null || this.ﹳ.isFinished())) {
            size = canvas.save();
            int width = getWidth();
            if (this.ʻ) {
                i = getPaddingTop();
            } else {
                i = 0;
            }
            canvas.rotate(90.0f);
            canvas.translate((float) (-i), (float) (-width));
            if (this.ﹳ == null || !this.ﹳ.draw(canvas)) {
                i = 0;
            } else {
                i = 1;
            }
            i2 |= i;
            canvas.restoreToCount(size);
        }
        if (!(this.ﾟ == null || this.ﾟ.isFinished())) {
            i = canvas.save();
            canvas.rotate(180.0f);
            if (this.ʻ) {
                canvas.translate((float) ((-getWidth()) + getPaddingRight()), (float) ((-getHeight()) + getPaddingBottom()));
            } else {
                canvas.translate((float) (-getWidth()), (float) (-getHeight()));
            }
            if (this.ﾟ != null && this.ﾟ.draw(canvas)) {
                i4 = 1;
            }
            i2 |= i4;
            canvas.restoreToCount(i);
        }
        if (i2 != 0 || this.ˊˋ == null || this.ॱˎ.size() <= 0 || !this.ˊˋ.ॱ()) {
            i3 = i2;
        }
        if (i3 != 0) {
            ViewCompat.ˎ(this);
        }
    }

    public void onDraw(Canvas canvas) {
        super.onDraw(canvas);
        int size = this.ॱˎ.size();
        for (int i = 0; i < size; i++) {
            ((f) this.ॱˎ.get(i)).ˊ(canvas, this, this.ˋˊ);
        }
    }

    protected boolean checkLayoutParams(android.view.ViewGroup.LayoutParams layoutParams) {
        return (layoutParams instanceof LayoutParams) && this.ˋॱ.ˏ((LayoutParams) layoutParams);
    }

    protected android.view.ViewGroup.LayoutParams generateDefaultLayoutParams() {
        if (this.ˋॱ != null) {
            return this.ˋॱ.ॱ();
        }
        throw new IllegalStateException("RecyclerView has no LayoutManager" + ˎ());
    }

    public android.view.ViewGroup.LayoutParams generateLayoutParams(AttributeSet attributeSet) {
        if (this.ˋॱ != null) {
            return this.ˋॱ.ˏ(getContext(), attributeSet);
        }
        throw new IllegalStateException("RecyclerView has no LayoutManager" + ˎ());
    }

    protected android.view.ViewGroup.LayoutParams generateLayoutParams(android.view.ViewGroup.LayoutParams layoutParams) {
        if (this.ˋॱ != null) {
            return this.ˋॱ.ˏ(layoutParams);
        }
        throw new IllegalStateException("RecyclerView has no LayoutManager" + ˎ());
    }

    void ʿ() {
        int ˋ = this.ʼ.ˋ();
        for (int i = 0; i < ˋ; i++) {
            s ˏ = ˏ(this.ʼ.ˋ(i));
            if (!ˏ.G_()) {
                ˏ.ˊ();
            }
        }
    }

    void ˉ() {
        int ˋ = this.ʼ.ˋ();
        for (int i = 0; i < ˋ; i++) {
            s ˏ = ˏ(this.ʼ.ˋ(i));
            if (!ˏ.G_()) {
                ˏ.ˎ();
            }
        }
        this.ˋ.ʻ();
    }

    void ʻ(int i, int i2) {
        int i3;
        int ˋ = this.ʼ.ˋ();
        int i4;
        int i5;
        if (i < i2) {
            i3 = -1;
            i4 = i2;
            i5 = i;
        } else {
            i3 = 1;
            i4 = i;
            i5 = i2;
        }
        for (int i6 = 0; i6 < ˋ; i6++) {
            s ˏ = ˏ(this.ʼ.ˋ(i6));
            if (ˏ != null && ˏ.ˎ >= r3 && ˏ.ˎ <= r2) {
                if (ˏ.ˎ == i) {
                    ˏ.ˎ(i2 - i, false);
                } else {
                    ˏ.ˎ(i3, false);
                }
                this.ˋˊ.ॱॱ = true;
            }
        }
        this.ˋ.ˊ(i, i2);
        requestLayout();
    }

    void ʽ(int i, int i2) {
        int ˋ = this.ʼ.ˋ();
        for (int i3 = 0; i3 < ˋ; i3++) {
            s ˏ = ˏ(this.ʼ.ˋ(i3));
            if (!(ˏ == null || ˏ.G_() || ˏ.ˎ < i)) {
                ˏ.ˎ(i2, false);
                this.ˋˊ.ॱॱ = true;
            }
        }
        this.ˋ.ˎ(i, i2);
        requestLayout();
    }

    void ˏ(int i, int i2, boolean z) {
        int i3 = i + i2;
        int ˋ = this.ʼ.ˋ();
        for (int i4 = 0; i4 < ˋ; i4++) {
            s ˏ = ˏ(this.ʼ.ˋ(i4));
            if (!(ˏ == null || ˏ.G_())) {
                if (ˏ.ˎ >= i3) {
                    ˏ.ˎ(-i2, z);
                    this.ˋˊ.ॱॱ = true;
                } else if (ˏ.ˎ >= i) {
                    ˏ.ˎ(i - 1, -i2, z);
                    this.ˋˊ.ॱॱ = true;
                }
            }
        }
        this.ˋ.ˎ(i, i2, z);
        requestLayout();
    }

    void ˊ(int i, int i2, Object obj) {
        int ˋ = this.ʼ.ˋ();
        int i3 = i + i2;
        for (int i4 = 0; i4 < ˋ; i4++) {
            View ˋ2 = this.ʼ.ˋ(i4);
            s ˏ = ˏ(ˋ2);
            if (ˏ != null && !ˏ.G_() && ˏ.ˎ >= i && ˏ.ˎ < i3) {
                ˏ.ˎ(2);
                ˏ.ˏ(obj);
                ((LayoutParams) ˋ2.getLayoutParams()).ˋ = true;
            }
        }
        this.ˋ.ॱ(i, i2);
    }

    boolean ˋ(s sVar) {
        return this.ˊˋ == null || this.ˊˋ.ˋ(sVar, sVar.ʽॱ());
    }

    void ˊ(boolean z) {
        this.ʾ |= z;
        this.ʼॱ = true;
        ˊᐝ();
    }

    void ˊᐝ() {
        int ˋ = this.ʼ.ˋ();
        for (int i = 0; i < ˋ; i++) {
            s ˏ = ˏ(this.ʼ.ˋ(i));
            if (!(ˏ == null || ˏ.G_())) {
                ˏ.ˎ(6);
            }
        }
        ʽॱ();
        this.ˋ.ʽ();
    }

    public void setPreserveFocusAfterLayout(boolean z) {
        this.ˊʼ = z;
    }

    public s ॱ(@NonNull View view) {
        Object parent = view.getParent();
        if (parent == null || parent == this) {
            return ˏ(view);
        }
        throw new IllegalArgumentException("View " + view + " is not a direct child of " + this);
    }

    @Nullable
    public View ˊ(@NonNull View view) {
        RecyclerView parent = view.getParent();
        View view2 = view;
        while (parent != null && parent != this && (parent instanceof View)) {
            View view3 = parent;
            view2 = view3;
            ViewParent parent2 = view3.getParent();
        }
        return parent == this ? view2 : null;
    }

    @Nullable
    public s ˋ(@NonNull View view) {
        View ˊ = ˊ(view);
        return ˊ == null ? null : ॱ(ˊ);
    }

    public static s ˏ(View view) {
        if (view == null) {
            return null;
        }
        return ((LayoutParams) view.getLayoutParams()).ˎ;
    }

    public int ʼ(@NonNull View view) {
        s ˏ = ˏ(view);
        return ˏ != null ? ˏ.ˋ() : -1;
    }

    public int ॱॱ(@NonNull View view) {
        s ˏ = ˏ(view);
        return ˏ != null ? ˏ.ˏ() : -1;
    }

    @Nullable
    public s ˎ(int i) {
        if (this.ʼॱ) {
            return null;
        }
        int ˋ = this.ʼ.ˋ();
        int i2 = 0;
        s sVar = null;
        while (i2 < ˋ) {
            s ˏ = ˏ(this.ʼ.ˋ(i2));
            if (ˏ == null || ˏ.ʻॱ() || ॱ(ˏ) != i) {
                ˏ = sVar;
            } else if (!this.ʼ.ˋ(ˏ.ˊ)) {
                return ˏ;
            }
            i2++;
            sVar = ˏ;
        }
        return sVar;
    }

    @Nullable
    s ˏ(int i, boolean z) {
        int ˋ = this.ʼ.ˋ();
        s sVar = null;
        for (int i2 = 0; i2 < ˋ; i2++) {
            s ˏ = ˏ(this.ʼ.ˋ(i2));
            if (!(ˏ == null || ˏ.ʻॱ())) {
                if (z) {
                    if (ˏ.ˎ != i) {
                        continue;
                    }
                } else if (ˏ.ˏ() != i) {
                    continue;
                }
                if (!this.ʼ.ˋ(ˏ.ˊ)) {
                    return ˏ;
                }
                sVar = ˏ;
            }
        }
        return sVar;
    }

    public s ˏ(long j) {
        if (this.ˊॱ == null || !this.ˊॱ.ˋ()) {
            return null;
        }
        int ˋ = this.ʼ.ˋ();
        int i = 0;
        s sVar = null;
        while (i < ˋ) {
            s ˏ = ˏ(this.ʼ.ˋ(i));
            if (ˏ == null || ˏ.ʻॱ() || ˏ.ʽ() != j) {
                ˏ = sVar;
            } else if (!this.ʼ.ˋ(ˏ.ˊ)) {
                return ˏ;
            }
            i++;
            sVar = ˏ;
        }
        return sVar;
    }

    @Nullable
    public View ˋ(float f, float f2) {
        for (int ˊ = this.ʼ.ˊ() - 1; ˊ >= 0; ˊ--) {
            View ˎ = this.ʼ.ˎ(ˊ);
            float translationX = ˎ.getTranslationX();
            float translationY = ˎ.getTranslationY();
            if (f >= ((float) ˎ.getLeft()) + translationX && f <= translationX + ((float) ˎ.getRight()) && f2 >= ((float) ˎ.getTop()) + translationY && f2 <= ((float) ˎ.getBottom()) + translationY) {
                return ˎ;
            }
        }
        return null;
    }

    public boolean drawChild(Canvas canvas, View view, long j) {
        return super.drawChild(canvas, view, j);
    }

    public void ʽ(@Px int i) {
        int ˊ = this.ʼ.ˊ();
        for (int i2 = 0; i2 < ˊ; i2++) {
            this.ʼ.ˎ(i2).offsetTopAndBottom(i);
        }
    }

    public void ᐝ(@NonNull View view) {
    }

    public void ʽ(@NonNull View view) {
    }

    public void ॱॱ(@Px int i) {
        int ˊ = this.ʼ.ˊ();
        for (int i2 = 0; i2 < ˊ; i2++) {
            this.ʼ.ˎ(i2).offsetLeftAndRight(i);
        }
    }

    static void ˋ(View view, Rect rect) {
        LayoutParams layoutParams = (LayoutParams) view.getLayoutParams();
        Rect rect2 = layoutParams.ˏ;
        rect.set((view.getLeft() - rect2.left) - layoutParams.leftMargin, (view.getTop() - rect2.top) - layoutParams.topMargin, (view.getRight() + rect2.right) + layoutParams.rightMargin, layoutParams.bottomMargin + (rect2.bottom + view.getBottom()));
    }

    Rect ʻ(View view) {
        LayoutParams layoutParams = (LayoutParams) view.getLayoutParams();
        if (!layoutParams.ˋ) {
            return layoutParams.ˏ;
        }
        if (this.ˋˊ.ˋ() && (layoutParams.ˎ() || layoutParams.ˋ())) {
            return layoutParams.ˏ;
        }
        Rect rect = layoutParams.ˏ;
        rect.set(0, 0, 0, 0);
        int size = this.ॱˎ.size();
        for (int i = 0; i < size; i++) {
            this.ˏॱ.set(0, 0, 0, 0);
            ((f) this.ॱˎ.get(i)).ˏ(this.ˏॱ, view, this, this.ˋˊ);
            rect.left += this.ˏॱ.left;
            rect.top += this.ˏॱ.top;
            rect.right += this.ˏॱ.right;
            rect.bottom += this.ˏॱ.bottom;
        }
        layoutParams.ˋ = false;
        return rect;
    }

    public void ʼ(@Px int i, @Px int i2) {
    }

    void ᐝ(int i, int i2) {
        this.ꜞ++;
        int scrollX = getScrollX();
        int scrollY = getScrollY();
        onScrollChanged(scrollX, scrollY, scrollX, scrollY);
        ʼ(i, i2);
        if (this.ˊʻ != null) {
            this.ˊʻ.ˊ(this, i, i2);
        }
        if (this.ˋʽ != null) {
            for (scrollY = this.ˋʽ.size() - 1; scrollY >= 0; scrollY--) {
                ((n) this.ˋʽ.get(scrollY)).ˊ(this, i, i2);
            }
        }
        this.ꜞ--;
    }

    public void ʼ(int i) {
    }

    void ᐝ(int i) {
        if (this.ˋॱ != null) {
            this.ˋॱ.ˊॱ(i);
        }
        ʼ(i);
        if (this.ˊʻ != null) {
            this.ˊʻ.ˎ(this, i);
        }
        if (this.ˋʽ != null) {
            for (int size = this.ˋʽ.size() - 1; size >= 0; size--) {
                ((n) this.ˋʽ.get(size)).ˎ(this, i);
            }
        }
    }

    public boolean ˋˊ() {
        return !this.ʻॱ || this.ʼॱ || this.ॱॱ.ˎ();
    }

    void ˊˋ() {
        int ˊ = this.ʼ.ˊ();
        for (int i = 0; i < ˊ; i++) {
            View ˎ = this.ʼ.ˎ(i);
            s ॱ = ॱ(ˎ);
            if (!(ॱ == null || ॱ.ʽ == null)) {
                View view = ॱ.ʽ.ˊ;
                int left = ˎ.getLeft();
                int top = ˎ.getTop();
                if (left != view.getLeft() || top != view.getTop()) {
                    view.layout(left, top, view.getWidth() + left, view.getHeight() + top);
                }
            }
        }
    }

    @Nullable
    static RecyclerView ˊॱ(@NonNull View view) {
        if (!(view instanceof ViewGroup)) {
            return null;
        }
        if (view instanceof RecyclerView) {
            return (RecyclerView) view;
        }
        ViewGroup viewGroup = (ViewGroup) view;
        int childCount = viewGroup.getChildCount();
        for (int i = 0; i < childCount; i++) {
            View ˊॱ = ˊॱ(viewGroup.getChildAt(i));
            if (ˊॱ != null) {
                return ˊॱ;
            }
        }
        return null;
    }

    static void ˏ(@NonNull s sVar) {
        if (sVar.ॱ != null) {
            View view = (View) sVar.ॱ.get();
            while (view != null) {
                if (view != sVar.ˊ) {
                    ViewParent parent = view.getParent();
                    view = parent instanceof View ? (View) parent : null;
                } else {
                    return;
                }
            }
            sVar.ॱ = null;
        }
    }

    public long ˊˊ() {
        if (ॱ) {
            return System.nanoTime();
        }
        return 0;
    }

    void ˋॱ(View view) {
        s ˏ = ˏ(view);
        ʽ(view);
        if (!(this.ˊॱ == null || ˏ == null)) {
            this.ˊॱ.ॱ(ˏ);
        }
        if (this.ꜟ != null) {
            for (int size = this.ꜟ.size() - 1; size >= 0; size--) {
                ((h) this.ꜟ.get(size)).ˋ(view);
            }
        }
    }

    void ͺ(View view) {
        s ˏ = ˏ(view);
        ᐝ(view);
        if (!(this.ˊॱ == null || ˏ == null)) {
            this.ˊॱ.ˎ(ˏ);
        }
        if (this.ꜟ != null) {
            for (int size = this.ꜟ.size() - 1; size >= 0; size--) {
                ((h) this.ꜟ.get(size)).ˎ(view);
            }
        }
    }

    @VisibleForTesting
    boolean ॱ(s sVar, int i) {
        if (ᐝॱ()) {
            sVar.ˋॱ = i;
            this.ˑ.add(sVar);
            return false;
        }
        ViewCompat.setImportantForAccessibility(sVar.ˊ, i);
        return true;
    }

    void ˍ() {
        for (int size = this.ˑ.size() - 1; size >= 0; size--) {
            s sVar = (s) this.ˑ.get(size);
            if (sVar.ˊ.getParent() == this && !sVar.G_()) {
                int i = sVar.ˋॱ;
                if (i != -1) {
                    ViewCompat.setImportantForAccessibility(sVar.ˊ, i);
                    sVar.ˋॱ = -1;
                }
            }
        }
        this.ˑ.clear();
    }

    int ॱ(s sVar) {
        if (sVar.ˊ(524) || !sVar.ॱᐝ()) {
            return -1;
        }
        return this.ॱॱ.ˋ(sVar.ˎ);
    }

    @VisibleForTesting
    void ˏ(StateListDrawable stateListDrawable, Drawable drawable, StateListDrawable stateListDrawable2, Drawable drawable2) {
        if (stateListDrawable == null || drawable == null || stateListDrawable2 == null || drawable2 == null) {
            throw new IllegalArgumentException("Trying to set fast scroller without both required drawables." + ˎ());
        }
        Resources resources = getContext().getResources();
        mf mfVar = new mf(this, stateListDrawable, drawable, stateListDrawable2, drawable2, resources.getDimensionPixelSize(o.ly.a.ˏ), resources.getDimensionPixelSize(o.ly.a.ˊ), resources.getDimensionPixelOffset(o.ly.a.ॱ));
    }

    public void setNestedScrollingEnabled(boolean z) {
        ᐝᐝ().ˊ(z);
    }

    public boolean isNestedScrollingEnabled() {
        return ᐝᐝ().ˏ();
    }

    public boolean startNestedScroll(int i) {
        return ᐝᐝ().ˊ(i);
    }

    public boolean ॱॱ(int i, int i2) {
        return ᐝᐝ().ˊ(i, i2);
    }

    public void stopNestedScroll() {
        ᐝᐝ().ॱ();
    }

    public void ˊ(int i) {
        ᐝᐝ().ˎ(i);
    }

    public boolean hasNestedScrollingParent() {
        return ᐝᐝ().ˎ();
    }

    public boolean ʻ(int i) {
        return ᐝᐝ().ॱ(i);
    }

    public boolean dispatchNestedScroll(int i, int i2, int i3, int i4, int[] iArr) {
        return ᐝᐝ().ˊ(i, i2, i3, i4, iArr);
    }

    public boolean ˎ(int i, int i2, int i3, int i4, int[] iArr, int i5) {
        return ᐝᐝ().ˎ(i, i2, i3, i4, iArr, i5);
    }

    public boolean dispatchNestedPreScroll(int i, int i2, int[] iArr, int[] iArr2) {
        return ᐝᐝ().ˎ(i, i2, iArr, iArr2);
    }

    public boolean ˋ(int i, int i2, int[] iArr, int[] iArr2, int i3) {
        return ᐝᐝ().ॱ(i, i2, iArr, iArr2, i3);
    }

    public boolean dispatchNestedFling(float f, float f2, boolean z) {
        return ᐝᐝ().ˊ(f, f2, z);
    }

    public boolean dispatchNestedPreFling(float f, float f2) {
        return ᐝᐝ().ˎ(f, f2);
    }

    protected int getChildDrawingOrder(int i, int i2) {
        if (this.ˊʽ == null) {
            return super.getChildDrawingOrder(i, i2);
        }
        return this.ˊʽ.ॱ(i, i2);
    }

    private hr ᐝᐝ() {
        if (this.ˌॱ == null) {
            this.ˌॱ = new hr(this);
        }
        return this.ˌॱ;
    }
}
